I am currently making my own dispatcher similar to...
# coroutines
a
I am currently making my own dispatcher similar to TestDispatcher, but for different purpose (virtual time for simulations). As far as I can understand - the only correct way to override
delay
is to create my own dispatcher, which inherits
Delay
. The question I have is how this dispatchers knows which coroutine calls
scheduleResumeAfterDelay
. I need for delays working on diferent timelines to work independendly.
d
You could call
continuation.context.job
. I should note, though, that I don't think a single coroutine dispatcher in our library actually knows about the coroutines running on it, so you're breaking new ground.
a
Oh! Nice. Probably what I need. I forgot that continuation holds the context.