You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
User's feedback (and the current state of K/N memory model) shows that Dispatchers.Unconfined is widely used (e.g. see #351) and some users treat it as a default dispatcher in their applications.
While there is nothing broken in "execute my coroutine in current thread" behaviour and it is generally useful, Dispatcher.Unconfined has a serious flaw, it is prone to nondeterministicStackOverflowError which is usually hard or impossible to encounter in unit tests.
We can emulate simple thread-local event loop in Unconined implementation.
It still will serve its purpose of being a bridge between Java'ish and coroutine worlds (where runBlocking is not suitable of course), but now it will not lead to SOE and could eventually leave its experimental status.
This change is breaking because it will change the order coroutines are executed in Unconfined dispatcher
The text was updated successfully, but these errors were encountered:
User's feedback (and the current state of K/N memory model) shows that
Dispatchers.Unconfined
is widely used (e.g. see #351) and some users treat it as a default dispatcher in their applications.While there is nothing broken in "execute my coroutine in current thread" behaviour and it is generally useful,
Dispatcher.Unconfined
has a serious flaw, it is prone to nondeterministicStackOverflowError
which is usually hard or impossible to encounter in unit tests.We can emulate simple thread-local event loop in
Unconined
implementation.It still will serve its purpose of being a bridge between Java'ish and coroutine worlds (where
runBlocking
is not suitable of course), but now it will not lead to SOE and could eventually leave its experimental status.This change is breaking because it will change the order coroutines are executed in
Unconfined
dispatcherThe text was updated successfully, but these errors were encountered: