. Can someone confirm that this is there to prevent people from calling the method, not implementing it? Reading the documentation it seems that this is meant for custom dispatchers to implement but that you should avoid calling it manually
e
elizarov
10/02/2020, 7:25 AM
It should be neither used nor implemented. It used to be used in the past internally by
UnconfiedDispatcher
, but it is not used anymore, so it could disappear from API at any time.
elizarov
10/02/2020, 7:30 AM
Double-checked. It is still used internally to ensure that when you
yield()
inside a
Dispatchers.Default
it is done in a fair way. But not used for "immediate" behavior anymore. For immediate behavior you just return
false
from
isDispatchNeeded
a
ansman
10/02/2020, 4:25 PM
Interesting. That's good to know
ansman
10/02/2020, 4:25 PM
This is for AndroidX's PausingDispatcher
ansman
10/02/2020, 4:26 PM
Ideally I would like to handle a regular dispatch and a yield dispatch differently