pub fn before_stop<F>(&mut self, f: F) -> &mut Self
        where F: Fn(usize) + Send + Sync + 'static
    {
        self.before_stop = Some(Arc::new(f));
        self
    }
/// Execute closure `f` just prior to shutting down each worker thread.
///
/// This hook is intended for bookkeeping and monitoring.
/// The closure `f` will be dropped after the `builder` is droppped
/// and all threads in the pool have executed it.
///
/// The closure provided will receive an index corresponding to the worker
/// thread it's running on.
Execute closure `f` just prior to shutting down each worker thread.
This hook is intended for bookkeeping and monitoring.
The closure `f` will be dropped after the `builder` is droppped
and all threads in the pool have executed it.

The closure provided will receive an index corresponding to the worker
thread it's running on.
Execute closure ` f ` just prior to shutting down each worker thread . This hook is intended for bookkeeping and monitoring . The closure ` f ` will be dropped after the ` builder ` is droppped and all threads in the pool have executed it . The closure provided will receive an index corresponding to the worker thread it ' s running on .
pub fn before_stop<F>(&mut self, f: F) -> &mut Self
        where F: Fn(usize) + Send + Sync + 'static
    {
        self.before_stop = Some(Arc::new(f));
        self
    }
pub fn before_stop < F > ( & mut self , f : F ) -> & mut Self where F : Fn ( usize ) + Send + Sync + ' static { self . before_stop = Some ( Arc :: new ( f ) ) ; self }
Execute closure `f` just prior to shutting down each worker thread.
Execute closure ` f ` just prior to shutting down each worker thread .
&mut self
f
F