Skip to main content

Module dispatch

Module dispatch 

Available on crate feature tokio only.
Expand description

Shared dispatch machinery for the lazy publish, subscribe, and unsubscribe futures.

All three futures defer all work until first poll. On first poll they attempt to reserve a slot on the bounded command channel and push the built Command. Subsequent polls await receiver channels owned by the future.

Enumsยง

DispatchState ๐Ÿ”’
State of a future before its command has been pushed onto the event-loop channel.

Functionsยง

poll_dispatch_then ๐Ÿ”’
Drives dispatch then polls rx, short-circuiting on a dispatch error.
poll_oneshot ๐Ÿ”’
Polls a oneshot receiver and converts a dropped sender into Error::ConnectionClosed.