Hey guys; is there a different between ... CoroutineScope(SupervisorJob() + Dispatchers.IO) and ... CoroutineScope(Dispatchers.IO + SupervisorJob())
If yes, which is the correct format?
j
jasu
01/30/2022, 2:50 PM
I don’t think so, they both build coroutine context anyways.
👍 1
g
gildor
01/30/2022, 4:05 PM
There is no difference, check coroutines context doc, it essentially works as a map, so this expression works as merging of maps, as soon as there are no duplicate keys, order doesn't matter, in this case you combine dispatcher and job which have different keys for context