write_queue

Function write_queue 

Source
pub fn write_queue<W, M>(
    writer: W,
) -> (Sender<M>, impl Future<Output = Result<(), Error>>)
Expand description

Creates a new write queue that wraps the given AsyncWrite.

Returns (sender, task), where sender can be used to push writes onto the queue, and task is a future that performs the work of the writes. The queue will run as long as task is polled, until either sender.terminate() is called or sender and all of its clones are dropped.