Skip to main content

new

Function new 

Source
pub fn new<T>() -> (Publisher<T>, Waiter<T>)
Expand description

Creates a new published value. Returns a Publisher and Waiter pair. The Publisher and Waiter are safe to send to different threads. Waiters can be cloned and each instance of the clone will receive the published value.