pub fn execute<F>(&self, job: F)
    where
        F: FnOnce() + Send + 'static,
    {
        self.shared_data.queued_count.fetch_add(1, Ordering::SeqCst);
        self.jobs
            .send(Box::new(job))
            .expect("ThreadPool::execute unable to send job into queue.");
    }
/// Executes the function `job` on a thread in the pool.
///
/// # Examples
///
/// Execute four jobs on a thread pool that can run two jobs concurrently:
///
/// ```
/// use threadpool::ThreadPool;
///
/// let pool = ThreadPool::new(2);
/// pool.execute(|| println!("hello"));
/// pool.execute(|| println!("world"));
/// pool.execute(|| println!("foo"));
/// pool.execute(|| println!("bar"));
/// pool.join();
/// ```
Executes the function `job` on a thread in the pool.
Executes the function ` job ` on a thread in the pool .
pub fn execute<F>(&self, job: F)
    where
        F: FnOnce() + Send + 'static,
    {
        self.shared_data.queued_count.fetch_add(1, Ordering::SeqCst);
        self.jobs
            .send(Box::new(job))
            .expect("ThreadPool::execute unable to send job into queue.");
    }
pub fn execute < F > ( & self , job : F ) where F : FnOnce ( ) + Send + ' static , { self . shared_data . queued_count . fetch_add ( 1 , Ordering :: SeqCst ) ; self . jobs . send ( Box :: new ( job ) ) . expect ( " " ) ; }
Executes the function `job` on a thread in the pool.
Executes the function ` job ` on a thread in the pool .
&self
job
F
&self
job
F
examples
Execute four jobs on a thread pool that can run two jobs concurrently.

```
use threadpool::ThreadPool.

let pool = ThreadPool::new(2);
pool.execute(|| println!("hello"));
pool.execute(|| println!("world"));
pool.execute(|| println!("foo"));
pool.execute(|| println!("bar"));
pool.join();
```
Execute four jobs on a thread pool that can run two jobs concurrently . ` ` ` use threadpool :: ThreadPool . let pool = ThreadPool :: new ( 2 ) ; pool . execute ( || println! ( " hello " )) ; pool . execute ( || println! ( " world " )) ; pool . execute ( || println! ( " foo " )) ; pool . execute ( || println! ( " bar " )) ; pool . join () ; ` ` `