pub fn after_start<F>(&mut self, f: F) -> &mut Self
    where
        F: Fn(usize) + Send + Sync + 'static,
    {
        self.after_start = Some(Arc::new(f));
        self
    }
Execute the closure `f` immediately after each worker thread is started,
but before running any tasks on it.

This hook is intended for bookkeeping and monitoring.
The closure `f` will be dropped after the `builder` is dropped
and all worker threads in the pool have executed it.

The closure provided will receive an index corresponding to the worker
thread it's running on.
futures-executor/src/thread_pool.rs