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
No back-pressure for interceptor composed dispatcher through dispatch(opts, handler)
Async backpressure broken for sub dispatches, i.e. Pool makes false assumptions that nobody else has dispatched anything to its children. There is no way to know if a child can receive additional work without calling dispatch first at which point the request is already queued and can't be dispatched to another non-busy child.
Back-pressure is global even though children depend on the actual request options, e.g. Agent depends on opts.origin to pick its child and a 'drain' event doesn't necessarily mean that a request can be dispatched, which becomes a bigger issue due to 2.
Adding a get busy() property on the Dispatcher interface will not work due to 3.
Adding a 'busy' event to the Dispatcher interface will not work due to 3.
The only viable solution I can find is some kind of tryDispatch(opts, handler, onDrain) API with a onDrain(err) callback and keep dispatch(opts, handler) as a fire and forget API and then deprecate the 'drain' event + boolean return value of dispatch(opts, handler):boolean.
The text was updated successfully, but these errors were encountered:
dispatch(opts, handler)
Pool
makes false assumptions that nobody else has dispatched anything to its children. There is no way to know if a child can receive additional work without callingdispatch
first at which point the request is already queued and can't be dispatched to another non-busy child.Agent
depends onopts.origin
to pick its child and a'drain'
event doesn't necessarily mean that a request can be dispatched, which becomes a bigger issue due to 2.get busy()
property on theDispatcher
interface will not work due to 3.'busy'
event to theDispatcher
interface will not work due to 3.The only viable solution I can find is some kind of
tryDispatch(opts, handler, onDrain)
API with aonDrain(err)
callback and keepdispatch(opts, handler)
as a fire and forget API and then deprecate the'drain'
event + boolean return value ofdispatch(opts, handler):boolean
.The text was updated successfully, but these errors were encountered: