Skip to content

Instantly share code, notes, and snippets.

@nschlimm
Created March 22, 2012 10:14
Show Gist options
  • Save nschlimm/2157560 to your computer and use it in GitHub Desktop.
Save nschlimm/2157560 to your computer and use it in GitHub Desktop.
Ideal Threadpool for AsynchronousTask
ThreadPoolExecutor pool =
new ThreadPoolExecutor(6, 6,
0L, TimeUnit.MILLISECONDS,
new LinkedBlockingQueue<Runnable>(2500));
pool.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment