https://kotlinlang.org logo
#coroutines
Title
# coroutines
h

Hexa

03/30/2019, 12:10 AM
i thought Kotlin 1.3 already includes coroutines package so i dont need to explicitly add dependency for coroutines?
s

Satyam Agarwal

03/30/2019, 7:38 AM
+
t

tseisel

03/30/2019, 10:19 AM
The official Kotlin documentation states :
There are many approaches to this problem, and in Kotlin we take a very flexible one by providing Coroutine support at the language level and delegating most of the functionality to libraries, much in line with Kotlin's philosophy.
This means that the core building blocks for using coroutines such as the
suspend
keyword (and some functions in the stdlib) are available without adding a dependency. But they decided to move complex features (
launch
,
async
, and anything else) to libraries an particularly to
kotlinx-coroutines
. That's why you'll need to add an explicit dependency to
kotlinx-coroutines
most of the time.
👍 3
3 Views