Struct burst_pool::Sender
[−]
[src]
pub struct Sender<T> { /* fields omitted */ }
Methods
impl<T> Sender<T>
[src]
fn new() -> Sender<T>
[src]
fn mk_receiver(&mut self) -> Receiver<T>
[src]
Create a new receiver handle.
fn wake_all(&mut self)
[src]
Wake up all reciever threads.
This function is guaranteed to wake up all the threads. If some threads are already running, then those threads, or others, may be woken up spuriously in the future as a result.
This function does not block, but it does make a (single) syscall.
impl<T: Send> Sender<T>
[src]
fn enqueue(&mut self, x: Box<T>) -> Option<Box<T>>
[src]
Attempt to send a payload to a waiting receiver.
enqueue
will only succeed if there is a receiver ready to take the value right now. If no
receivers are ready, the value is returned-to-sender.
Note: enqueue
will not unblock the receiver it sends the payload to. You must call
wake_all
after calling enqueue
!
This function does not block or make any syscalls.