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

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.
主站蜘蛛池模板: 佛坪县| 桦甸市| 邹平县| 南通市| 固始县| 高唐县| 利川市| 佛山市| 洞口县| 信阳市| 右玉县| 临海市| 辽中县| 尉犁县| 昂仁县| 嘉祥县| 六盘水市| 都匀市| 昌乐县| 二手房| 丹棱县| 沈阳市| 固镇县| 尉氏县| 祁东县| 上林县| 阳原县| 霞浦县| 永平县| 尚志市| 且末县| 牙克石市| 无锡市| 淮阳县| 咸宁市| 广宁县| 景洪市| 嘉峪关市| 苏尼特左旗| 普洱| 河北区|