- Learning Concurrency in Kotlin
- Miguel Angel Castiblanco Torres
- 179字
- 2021-08-05 10:46:40
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.
推薦閱讀
- Dynamics 365 for Finance and Operations Development Cookbook(Fourth Edition)
- JBoss Weld CDI for Java Platform
- Expert C++
- Java入門經典(第6版)
- PyTorch自動駕駛視覺感知算法實戰
- Mastering SVG
- MySQL 8 DBA基礎教程
- Vue.js 3.0源碼解析(微課視頻版)
- Python Data Analysis Cookbook
- Android系統級深入開發
- 常用工具軟件立體化教程(微課版)
- Python機器學習:預測分析核心算法
- 深入理解C指針
- Principles of Strategic Data Science
- Learning VMware vSphere