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

Dias

11/02/2018, 5:52 PM
when I run GlobalScope.launch, is it backed by a threadpool? or it will run in the main thread?
e

elizarov

11/02/2018, 5:55 PM
It runs in a thread-pool of
Dispatchers.Default
d

Dias

11/02/2018, 5:58 PM
are all coroutines running in some kind thread pool? or I can launch them in the main thread?
e

elizarov

11/02/2018, 6:35 PM
You can explicitly specify dispatcher. You can read more here http://kotlinlang.org/docs/reference/coroutines/coroutine-context-and-dispatchers.html
4 Views