Module rendezvous

Source
Expand description

Rendezvous channel implementation

Rendezvous channels are equivalent to a channel with a 0-sized buffer: A sender cannot send until there is an active receiver waiting. This implementation uses a Semaphore to record demand and coordinate with the receiver.

Rendezvous channels should be used with care—it’s inherently easy to deadlock unless they’re being used from separate tasks or an a coroutine setup (e.g. crate::future::pagination_stream::fn_stream::FnStream)

Modules§

error
Errors for rendezvous channel

Structs§

Receiver
Receiver half of the rendezvous channel
Sender
Sender-half of a channel

Functions§

channel
Create a new rendezvous channel