- 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.
推薦閱讀
- Node.js 10實戰
- Processing互動編程藝術
- PHP網絡編程學習筆記
- PLC編程及應用實戰
- CouchDB and PHP Web Development Beginner’s Guide
- 重學Java設計模式
- Building Serverless Applications with Python
- QGIS 2 Cookbook
- 零基礎學C語言(升級版)
- Windows Phone 8 Game Development
- 交互式程序設計(第2版)
- PHP 8從入門到精通(視頻教學版)
- jQuery從入門到精通(微課精編版)
- Java RESTful Web Service實戰
- Cinder:Begin Creative Coding