danny
09/19/2018, 10:17 PM0.26.0
I see in the release notes that Dispatchers.Default
is now default dispatcher, but I had some existing code that was roughly runBlocking { someList.map { async { <do stuff with 'it'> } }.map { it.await } }
that previously ran on CommonPool
by default, but after the upgrade is constrained to the main thread. Guess I'm missing some detail around the structured concurrency changes...danny
09/19/2018, 10:18 PMasync(Dispatchers.Default)
I get what I expect, but I don't follow why that wouldn't be the case by default?bj0
09/19/2018, 10:31 PMasync
now inherits the context of its parent (runBlocking
). To get the same behavior you would use GlobalScope.async
bj0
09/19/2018, 10:32 PMbj0
09/19/2018, 10:32 PMdanny
09/20/2018, 2:48 AM