O'Reilly logo

Java 9 Cookbook by Nick Samoylov, Mohamed Sanaulla

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

There's more...

There are two more static factory methods in the Executors class that create instances of ExecutorService:

  • newWorkStealingPool(): This creates a work-stealing thread pool using the number of available processors as its target parallelism level. It has an overloaded version with a parallelism level as a parameter.
  • unconfigurableExecutorService(ExecutorService executor): This returns an object that delegates all the defined ExecutorService methods to the given executor, except for those methods that might otherwise be accessible using casts.

Also, a subinterface of the ExecutorService interface, called ScheduledExecutorService, enhances the API with the capability to schedule a thread execution in future and/or their periodic ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required