Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ThreadPoolExecutor executor = new ThreadPoolExecutor(
- 0, // core threads
- 10, // max threads
- 2000, TimeUnit.MILLISECONDS,
- new LinkedBlockingQueue<Runnable>(),
- Executors.defaultThreadFactory()
- );
- ThreadPoolExecutor executor = new ThreadPoolExecutor(
- 10, // core threads
- 10, // max threads
- 2000, TimeUnit.MILLISECONDS,
- new LinkedBlockingQueue<Runnable>(),
- Executors.defaultThreadFactory()
- );
- executor.allowCoreThreadTimeOut(true);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement