https://kotlinlang.org logo
Title
v

v0ldem0rt

07/23/2018, 3:38 PM
If I've created a threadpool using
newFixedThreadPoolContext
then will coroutines jump between threads like
Unconfined
?
g

gildor

07/23/2018, 4:37 PM
Jump between threads? What do you mean? All returns to coroutine will be explicitly dispatched by your dispatcher, maybe you could provide some example
m

mcastiblanco

07/23/2018, 6:02 PM
@v0ldem0rt any coroutine that you run with that context will both be started and resumed in any of the threads in the pool. Notice that
Unconfined
is a completely different approach, where your coroutine could be resumed in potentially any thread of the application, whereas a thread pool dispatcher will guarantee that it runs inside that pool
👍 1