Skip to content

Instantly share code, notes, and snippets.

@nelanka
Created August 25, 2015 14:08
Show Gist options
  • Save nelanka/9492f5f5e925edab2b5c to your computer and use it in GitHub Desktop.
Save nelanka/9492f5f5e925edab2b5c to your computer and use it in GitHub Desktop.
Named Thread Pool
implicit val ec = ExecutionContext.fromExecutor(Executors.newFixedThreadPool(8, new ThreadFactory() {
override def newThread(r: Runnable): Thread = new Thread(Thread.currentThread().getThreadGroup, r, "MyWorker")
}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment