java - How to stop active threads in ThreadPoolTaskExecutor throught jmx -
in app using threadpooltaskexecutor
. executor contains method return activethread getactivecount
. there option how stop active threads ? dont want shutdown executor want stop infinity process
while(true){ }
ps: have access executor because want stop thread through jmx
in app add new threads this:
taskexecutor.execute(new runnable() { @override public void run() { dosomething() } });
you need take quick check how adding tasks.
so long using submit add tasks can use future task returned (from call) cancel specific tasks. if use execute reliquishing control on task.
Comments
Post a Comment