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

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.
主站蜘蛛池模板: 新邵县| 铜山县| 分宜县| 监利县| 镇巴县| 文山县| 米泉市| 临汾市| 鄢陵县| 分宜县| 三门县| 乌海市| 崇仁县| 昌乐县| 临沧市| 吴堡县| 桓仁| 伊春市| 河南省| 丹阳市| 安龙县| 清远市| 淅川县| 正镶白旗| 葫芦岛市| 武安市| 华宁县| 江油市| 溧阳市| 祁连县| 枝江市| 临西县| 龙游县| 岗巴县| 淮阳县| 富平县| 安泽县| 嘉禾县| 定日县| 旺苍县| 托克托县|