Skip to content

Instantly share code, notes, and snippets.

@parahall
Created May 7, 2018 21:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save parahall/52c3ff1c38900905d4df7780e27bd49b to your computer and use it in GitHub Desktop.
Save parahall/52c3ff1c38900905d4df7780e27bd49b to your computer and use it in GitHub Desktop.
int threads = Runtime.getRuntime().availableProcessors();
ExecutorService executor = Executors.newFixedThreadPool(threads);
executor.submit(myWork);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment