spring-framework / org.springframework.scheduling.concurrent / ForkJoinPoolFactoryBean / setCommonPool

setCommonPool

open fun setCommonPool(commonPool: Boolean): Unit

Set whether to expose JDK 8's 'common' ForkJoinPool.

Default is "false", creating a local ForkJoinPool instance based on the "parallelism", "threadFactory", "uncaughtExceptionHandler" and "asyncMode" properties on this FactoryBean.

NOTE: Setting this flag to "true" effectively ignores all other properties on this FactoryBean, reusing the shared common JDK ForkJoinPool instead. This is a fine choice on JDK 8 but does remove the application's ability to customize ForkJoinPool behavior, in particular the use of custom threads.

Since
3.2

See Also
java.util.concurrent.ForkJoinPool#commonPool()