[][src]Function thread_io::write::writer_init_finish

pub fn writer_init_finish<W, I, F, O, F2, O2, E>(
    bufsize: usize,
    queuelen: usize,
    init_writer: I,
    func: F,
    finish: F2
) -> Result<(O, O2), E> where
    I: Send + FnOnce() -> Result<W, E>,
    F: FnOnce(&mut Writer) -> Result<O, E>,
    W: Write,
    F2: Send + FnOnce(W) -> O2,
    O2: Send,
    E: Send + From<Error>, 

This method takes both an initializing closure (see writer_init), and a closure for finalizing or returning data back to the main thread (see writer_finish).

The output values of func and the finish closure are returned as a tuple.