are coroutines going to be merged into the standar...
# coroutines
s
are coroutines going to be merged into the standard library (kotlin-stdlib) for the 1.3 release, or will they remain a separate artifact?
e
support for coroutines in the Kotlin language is part of stdlib.
kotlinx.coroutines
library will remain a separate artifact and will be released in a stable version
1.0.0
together with Kotlin
1.3.0
.
s
Yeah, that's what I meant. Thanks!
t
@elizarov sorry this may seem silly but what exactly do you mean by that?
e
Exactly what I’ve said. What part of that need clarification? Can you elaborate your question, please?
s
@tw The Kotlin standard library has support for, but no implementation of, coroutines. The implementation is provided by the
kotlinx.coroutines
libraries. My question was, will the implementation be merged into the standard library? And the answer is, according to @elizarov, that the implementation of coroutines will stay outside of the standard library. Does that answer your question?
e
To be fair,
sequence { ... }
coroutine builder is a part of stdlib. You can write and use suspending functions anywhere — that is fully supported by Kotlin (the language) and its standard library. You can start new coroutines via
startCoroutine
using just stdlib.
However, you’ll need
kotlinx.coroutines
library for higher-level features like cancellation, so `launch`/`async` (which support cancellation and structured concurrency) are part of
kotllinx.coroutines
.
t
AHH this makes sense
I wanted to fully understand the difference between stdlib and the dependency
s
I do have one more question @elizarov: is there any particular reason why
runBlocking
isn't in
coroutines-core-common
?
e
Yes. It cannot be implemented in JS.
s
Gotcha, thanks. 👍
e
You cannot block JS event thread.