Struct clocked_dispatch::Dispatcher [] [src]

pub struct Dispatcher<T: Send> { /* fields omitted */ }

Dispatch coordinator for adding additional clocked channels.

Methods

impl<T: Send> Dispatcher<T>
[src]

Creates a new named, synchronous, bounded, clocked channel managed by this dispatcher.

The given receiver and sender names must be unique for this dispatch.

The ClockedReceiver will block until a message or a new timestamp becomes available.

The receiver's incoming channel has an internal buffer on which messages will be queued. Its size is inherited from the dispatch bound. When this buffer becomes full, future messages from the dispatcher will block waiting for the buffer to open up. Note that a buffer size of 0 is valid, but its behavior differs from that of synchronous Rust channels. Because the dispatcher sits between the sender and the receiver, a bound of 0 will not guarantee a "rendezvous" between the sender and the receiver, but rather between the sender and the dispatcher (and subsequently, the dispatcher and the receiver).