Do you know by chance if the threads specified by CoreConstants.SCHEDULED_EXECUTOR_POOL_SIZE are created upfront or lazily?
The threads aren't created as soon as the ScheduledThreadPoolExecutor is created. But whenever a task is submitted, if the number of threads in the pool is less than the specified pool size, a new thread is created. i.e. if you specify corePoolSize = 50, you'll have 0 threads to begin with, 10 threads after 10 tasks have been submitted, 50 threads after 50 tasks have been submitted, 50 threads after 100 tasks submitted.
|