官术网_书友最值得收藏!

Conventions used

There are a number of text conventions used throughout this book.

CodeInText: Indicates the name of variables, functions, classes, packages, files, and URLs. Here is an example: "The hcf() function will freeze the system."

A block of code is set as follows:

fun main(args: Array<String>) = runBlocking {
val time = measureTimeMillis {
val name = async { getName() }
val lastName = async { getLastName() }

println("Hello, ${name.await()} ${lastName.await()}")
}

println("Execution took $time ms")
}

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

fun main(args: Array<String>) = runBlocking {
val netDispatcher = newSingleThreadContext(name = "ServiceCall")

val task = launch(netDispatcher) {
printCurrentThread()
}

task.join()
}

Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "Please make sure that the Include Kotlin Support option is enabled."

Warnings or important notes appear like this.
Tips and tricks appear like this.
主站蜘蛛池模板: 专栏| 江都市| 绥阳县| 清流县| 永登县| 云霄县| 嘉善县| 黎平县| 新郑市| 延安市| 宣化县| 河北区| 繁峙县| 北票市| 宿松县| 河间市| 阿荣旗| 大田县| 增城市| 大悟县| 瓦房店市| 容城县| 蚌埠市| 嘉鱼县| 达日县| 方正县| 南康市| 舒兰市| 德州市| 茌平县| 朝阳县| 蒲江县| 嘉义县| 景泰县| 田阳县| 依兰县| 安阳市| 广东省| 阜宁县| 大理市| 调兵山市|