A thread pool provides a convenient way to process events off the main thread. When you send events to the thread pool, the pool creates a new thread to process the event, up to the number of threads specified by the
| || ||Get/set the maximum number of idle threads that are kept alive. Once there are more than this many idle worker threads, the idle threads start getting destroyed.|
| || ||Get/set the amount of time in milliseconds that a thread must be idle before it becomes eligible to be destroyed.|
| || || |
An optional listener that will be notified when a thread is created or destroyed in the course of the thread pool's operation.
A listener will only receive notifications about threads created after the listener is set so it is recommended that the consumer set the listener before dispatching the first event. A listener that receives an
| || ||The maximum number of threads allowed at once in the pool; you may change this value by altering this attribute.|
Shuts down the thread pool.
Warning: You must not call this method from any thread within the thread pool. Instead, you should call it from another thread (typically the one that created the thread pool).
When this method returns, the thread pool and all its threads will have been shut down, and it is no longer be possible to dispatch events to the thread pool.