src/main/java/com/latincoder/sbconcurrent/configuration/BeanProvider.java
@Bean
    @Scope("singleton")
    public ExecutorService executorService() {
        return Executors.newWorkStealingPool(Runtime.getRuntime().availableProcessors());
    }
/**
     * Scope is defined as 'singleton' intentionally even though it's Spring's default
     * the reason for this is that whenever a new developer looks at this code, she or he
     * does not need to know Spring to understand that this object is ment to be a Singleton
     *
     * By default access runtime's availableProcessors to use the numer of cores as threads.
     * This is common default value for multithreaded apps. Althought the "best" number of
     * threads can only be determined based on specific use case
     * @return ExecutorService
     */
Scope is defined as 'singleton' intentionally even though it's Spring's default
the reason for this is that whenever a new developer looks at this code, she or he
does not need to know Spring to understand that this object is ment to be a Singleton

By default access runtime's availableProcessors to use the numer of cores as threads.
This is common default value for multithreaded apps. Althought the "best" number of
threads can only be determined based on specific use case
@return ExecutorService
Scope is defined as ' singleton ' intentionally even though it ' s Spring ' s default the reason for this is that whenever a new developer looks at this code she or he does not need to know Spring to understand that this object is ment to be a Singleton By default access runtime ' s availableProcessors to use the numer of cores as threads . This is common default value for multithreaded apps . Althought the " best " number of threads can only be determined based on specific use case @return ExecutorService
@Bean
    @Scope("singleton")
    public ExecutorService executorService() {
        return Executors.newWorkStealingPool(Runtime.getRuntime().availableProcessors());
    }
@ Bean @ Scope ( "singleton" ) public ExecutorService executorService ( ) { return Executors . newWorkStealingPool ( Runtime . getRuntime ( ) . availableProcessors ( ) ) ; }
Scope is defined as 'singleton' intentionally even though it's Spring's default
 the reason for this is that whenever a new developer looks at this code, she or he
 does not need to know Spring to understand that this object is ment to be a Singleton
Scope is defined as ' singleton ' intentionally even though it ' s Spring ' s default the reason for this is that whenever a new developer looks at this code she or he does not need to know Spring to understand that this object is ment to be a Singleton