- Learning Concurrency in Kotlin
- Miguel Angel Castiblanco Torres
- 180字
- 2021-08-05 10:46:41
Putting things together
So far, we have learned that an application is composed of one or more processes and that each process has one or more threads. We have also learned that blocking a thread means halting the execution of the code in that thread, and for that reason, a thread that interacts with a user is expected to never be blocked. We also know that a coroutine is basically a lightweight thread that resides in a thread but is not tied to one. The following diagram encapsulates the content of this section so far. Notice how each coroutine is started in one thread but at some point is resumed in a different one:

In a nutshell, concurrency occurs when an application runs in more than one thread at the same time. So in order for concurrency to happen, two or more threads need to be created, and both communication and synchronization of those threads will most likely be needed for correct functioning of the application.
- 精通Nginx(第2版)
- 自己動手寫搜索引擎
- JavaScript全程指南
- 解構(gòu)產(chǎn)品經(jīng)理:互聯(lián)網(wǎng)產(chǎn)品策劃入門寶典
- Java系統(tǒng)分析與架構(gòu)設(shè)計
- 樂高機器人設(shè)計技巧:EV3結(jié)構(gòu)設(shè)計與編程指導
- C語言程序設(shè)計實訓教程
- 數(shù)據(jù)結(jié)構(gòu)與算法JavaScript描述
- 網(wǎng)頁設(shè)計與制作教程(HTML+CSS+JavaScript)(第2版)
- Python神經(jīng)網(wǎng)絡項目實戰(zhàn)
- Python編程完全入門教程
- 基于差分進化的優(yōu)化方法及應用
- 游戲程序設(shè)計教程
- PhoneGap:Beginner's Guide(Third Edition)
- Web程序設(shè)計:ASP.NET(第2版)