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
Depending on whether update is called from the main thread, the block in updateUi will happen either earlier or later than readUiElement, even though visually, it seems like updateUi should happen earlier.
Notably, all the other implementations of Dispatchers.Main that we provide don't suffer from the same problem but instead consistently output 1, 2, 3 in both scenarios.
The text was updated successfully, but these errors were encountered:
See #3924 (comment)
This code produces
1
,2
,3
:This code, however, produces
1
,3
,2
:This behavior may be surprising. For example, consider this pseudo-code:
Depending on whether
update
is called from the main thread, the block inupdateUi
will happen either earlier or later thanreadUiElement
, even though visually, it seems likeupdateUi
should happen earlier.Notably, all the other implementations of
Dispatchers.Main
that we provide don't suffer from the same problem but instead consistently output1
,2
,3
in both scenarios.The text was updated successfully, but these errors were encountered: