java - meaning of 'core pool size' in ScheduledThreadPoolExecutor's constructor -
i'm new scheduledthreadpoolexecutor
(as use simple timer
, people have been advising against it), , don't quite understand appropriate integer value pass scheduledthreadpoolexecutor(int)
constructor.
could explain this?
thank you
in case of scheduledthreadpoolexecutor
, corepoolsize
maximum number of threads created perform scheduled actions. thread pool fixed-sized , idle threads kept alive.
drunkenrabbit's answer ivalid because scheduledthreadpoolsexecutor
docs says explicitly (there no thread coun spikes @ all):
while class inherits threadpoolexecutor, few of inherited tuning methods not useful it. in particular, because acts fixed-sized pool using corepoolsize threads , unbounded queue, adjustments maximumpoolsize have no useful effect.
now value, reasonable number number of cpu cores application running on.
Comments
Post a Comment