Marc Knaup
10/15/2020, 8:07 PMstreetsofboston
10/15/2020, 8:27 PMMarc Knaup
10/15/2020, 8:31 PMstreetsofboston
10/15/2020, 8:33 PMMarc Knaup
10/15/2020, 8:36 PMstreetsofboston
10/15/2020, 8:39 PMMarc Knaup
10/15/2020, 8:40 PMdanny
10/16/2020, 12:03 AMMarc Knaup
10/16/2020, 12:35 AMflowOn
, launch(In)
and withContext()
calls that delegate to Default dispatcher where it’s not strictly necessary.
I’ll check the coroutines code. Maybe I Can put a breakpoint somewhere and get an idea how often it happens and where.danny
10/16/2020, 2:01 AMMarc Knaup
10/16/2020, 2:33 AMgildor
10/16/2020, 2:37 AMunintentional switches between Default and IODefault and IO share threads, so there is no switch between them
danny
10/16/2020, 3:52 AMbezrukov
10/16/2020, 9:36 AMso there is no switch between themI think you can rely on it only in one direction, when switching from Default to IO. When you're switching from IO to Default back, I think it's very likely that there will be thread switch.
gildor
10/16/2020, 10:00 AMbezrukov
10/16/2020, 10:33 AMlouiscad
10/16/2020, 10:51 AMbezrukov
10/16/2020, 10:55 AMrepeat(8) {
launch(Dispatchers.Default) {
Thread.sleep(50) // blocking call
}
}that doesn't print anything. All other print statements are "sequential" in terms of coroutines
louiscad
10/16/2020, 10:57 AMbezrukov
10/16/2020, 10:57 AMLuis Munoz
10/16/2020, 2:19 PMMarc Knaup
10/16/2020, 2:41 PMLuis Munoz
10/16/2020, 2:58 PMMarc Knaup
10/16/2020, 2:59 PMCancellationException
? 😄louiscad
10/16/2020, 3:51 PMMarc Knaup
10/16/2020, 3:54 PMLuis Munoz
10/17/2020, 8:06 AMMarc Knaup
10/17/2020, 11:43 AMdelay
Luis Munoz
10/17/2020, 4:15 PMMarc Knaup
10/17/2020, 4:20 PMLuis Munoz
10/17/2020, 4:39 PMgildor
10/18/2020, 1:37 PMdanny
10/18/2020, 11:55 PM