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
Post a Comment