Join Slack
Powered by
<@U9KTWSDRA> You can create coroutine dispatcher f...
# coroutines
g
gildor
04/02/2018, 3:39 AM
@Chih
You can create coroutine dispatcher from any thread pool executor, there is an extension function for that:
https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental/java.util.concurrent.-executor/as-coroutine-dispatcher.html
Also you can create CoroutineDispatcher of fixed size directly using functions
newSingleThreadContext
and
newFixedThreadPoolContext
Also coroutine context is not only dispatcher (context type that controls execution strategy)
👍 1
c
Chih
04/06/2018, 10:12 PM
Thanks a lot Andrey!
2
Views
Open in Slack
Previous
Next