Is `Dispatchers.setMain` also coming for js ?
# coroutines
s
Is
Dispatchers.setMain
also coming for js ?
g
Do you mean Dispatchers.Main?
g
ahhh
I see
but what exactly do you plan to set there in JS?
s
Not sure yet. Maybe
immediate
. Currently looking into some testing of our ui compoents in kotlin/js
Seems like it ought to be pretty analogous to testing in android
g
but in js is exactly the same thing, there is only one thread, so immediate is not different from Main
s
Ah sorry. I meant
Unconfined
g
This is also the same
There are no threads on JS, so Unconfined, Main and Default is actually the same thing
at least in terms of testing
s
That is not what I am seeing. Main/Default is async whereas Unconfined jobs are invoked synchronously
g
hm, I see, maybe because of event queue, than it make sense
b
Unconfined is invoked immediately on the JVM too isn't it?
g
yes, but it a bit more complicated, it also has an event queue inside to avoid some problems with blocking context