what is the entity responsible for resuming a coro...
# coroutines
k
what is the entity responsible for resuming a coroutine? Is it a
Dispatcher
?
o
technically, it can be anything that calls Continuation.resume
k
For context, if I wanted to implement non blocking IO and wanted to implement a
kqueue
of sorts, would the polling thread be contained inside of a dispatcher? Or would the dispatcher
dispatch
to a worker thread which polls the queue and calls
Continuation.resume
from there?
this is a throught exercise currently
o
commonly a ContinuationInterceptor (which a Dispatcher is) will intercept the resume call (by delegation pattern ) and redispatch it to the appropriate thread
the polling thread does not need to be in a Dispatcher itself
k
perfect
thank you