Signals shutdown and waits for all queued tasks to complete. No new tasks can be submitted after calling this method.
Example:
pool.shutdown ();