// demand - in case none of its cached threads is free - until threadPoolSize
// is reached. Subsequently, a threadPoolSize of 2 effectively disables
// caching of threads.
if ( m_sync_pool == null )
{
m_sync_pool = new DefaultThreadPool(m_threadPoolSize, true);
}
else
{
m_sync_pool.configure(m_threadPoolSize);
}
final int asyncThreadPoolSize = m_threadPoolSize > 5 ? m_threadPoolSize / 2 : 2;
if ( m_async_pool == null )
{
m_async_pool = new DefaultThreadPool(asyncThreadPoolSize, false);
}
else
{
m_async_pool.configure(asyncThreadPoolSize);
}