i thought Kotlin 1.3 already includes coroutines p...
# coroutines
h
i thought Kotlin 1.3 already includes coroutines package so i dont need to explicitly add dependency for coroutines?
s
+
t
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