Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/devopsthinh/kotlin-coroutines
Kotlin offers a nice feature known as coroutine - a high-level framework, to perform anything asynchronously, coordinate tasks behind the scenes. It will make the developer's life easier. Code readability, conciseness, and easier thread management.
https://github.com/devopsthinh/kotlin-coroutines
anko-coroutine async-await asynchronous coroutines coroutines-android coroutines-channels coroutines-flow kotlin-coroutines
Last synced: 10 days ago
JSON representation
Kotlin offers a nice feature known as coroutine - a high-level framework, to perform anything asynchronously, coordinate tasks behind the scenes. It will make the developer's life easier. Code readability, conciseness, and easier thread management.
- Host: GitHub
- URL: https://github.com/devopsthinh/kotlin-coroutines
- Owner: DevOpsThinh
- Created: 2022-02-21T13:26:45.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-07-13T15:41:28.000Z (over 2 years ago)
- Last Synced: 2024-11-22T12:12:17.648Z (2 months ago)
- Topics: anko-coroutine, async-await, asynchronous, coroutines, coroutines-android, coroutines-channels, coroutines-flow, kotlin-coroutines
- Language: Kotlin
- Homepage:
- Size: 285 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Thanks for your reading, please give me a STAR!
#### "It is far easier to design a class to be thread-safe than to retrofit it for thread safety later."
(Brian Goetz - Java concurrency: Publisher: Addison-Wesley Professional, Year: 2006; 2013)
### Coroutine
A coroutine is Kotlin's way of tackling asynchronous operations, multi-threaded programming
or manging concurrency.
According to Coroutine Team, Java threads have below problems:
- Context switching for thread can be a costly operation;
- Various the various OS does restrict the number of threads created by per app. They can
be infinite;
- There are still a few platforms that do not support threads (JavaScript);
- It's always difficult to debug threads;
- Dealing with race conditions can be a nightmare.
#### => Coroutine has answered all the above problems & it also runs in parallel.### Used Software Info:
Kotlin v1.6, IntelliJ IDEA Education Edition, JDK 1.8### References
- ##### https://github.com/Kotlin/kotlinx.coroutines
- Anko-Coroutines: https://github.com/Kotlin/anko/wiki/Anko-Coroutines