- Kotlin for Enterprise Applications using Java EE
- Raghavendra Rao K
- 217字
- 2021-06-10 18:49:26
Working with coroutines
A program in execution that initiates long-running operations, such as file IO, network IO, or CPU- or GPU-intensive work, requires the invoker to block until the operations complete. Programming languages handle this via concurrency.
The JVM has support for concurrency. Java has had strong support for multithreading and concurrency since its first release. Any process that is running inside the JVM can create a number of threads to execute multiple tasks in an asynchronous fashion. However, developing concurrent code in an optimal and error-free manner and debugging it is really challenging. Java provides various constructs to write concurrent code and, along with other JVM languages and third-party libraries, has tried to come up with innovative and elegant ways to achieve concurrency.
Java 5 made a lot of progress with regard to writing concurrent applications. It has higher-level constructs, such as the executor framework, which makes it easier to write concurrent code and allows us to decouple thread management code from the business logic. Java 8 has introduced parallel streams to turn the code to concurrent much more easily. RxJava brings reactive extensions to Java, allowing us to write very concise code for asynchronous functionality. Kotlin supports almost all of those approaches and offers a few of its own as well.
- Cross-platform Desktop Application Development:Electron,Node,NW.js,and React
- Oracle 12c中文版數(shù)據(jù)庫(kù)管理、應(yīng)用與開(kāi)發(fā)實(shí)踐教程 (清華電腦學(xué)堂)
- JavaScript+jQuery開(kāi)發(fā)實(shí)戰(zhàn)
- 我的第一本算法書(shū)
- Mastering Python Scripting for System Administrators
- Android 7編程入門(mén)經(jīng)典:使用Android Studio 2(第4版)
- MATLAB應(yīng)用與實(shí)驗(yàn)教程
- Java虛擬機(jī)字節(jié)碼:從入門(mén)到實(shí)戰(zhàn)
- 老“碼”識(shí)途
- Web程序設(shè)計(jì)(第二版)
- Bootstrap 4:Responsive Web Design
- Learning Vaadin 7(Second Edition)
- SQL Server與JSP動(dòng)態(tài)網(wǎng)站開(kāi)發(fā)
- 響應(yīng)式Web設(shè)計(jì):HTML5和CSS3實(shí)戰(zhàn)(第2版)
- Web前端開(kāi)發(fā)最佳實(shí)踐