java - How to limit a task from using all threads in a thread pool? -


i'm using thread pool execute tasks in background of application. however, of tasks heavier others. i'd limit heavy tasks subset of thread pool, thereby leaving @ least few threads open lightweight tasks execute.

is there simple way this?

the simple way use separate thread pools different "tasks weight".

even can create separate class exposes separate methods differents tasks.


Comments

Popular posts from this blog

how to build hyperlink for query string in php -

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

queue - mq_receive: message too long -