Javatpoint Logo
Javatpoint Logo

shutdown() Method

The shutdown() method of ForkJoinPool class initiates an orderly shutdown in which previously submitted tasks are executed, but no new tasks will be accepted.

Syntax

Parameter

No parameter is passed.

Returns

Does not return value.

Throws

Does not throw the exception.

Example 1

Test it Now

Output:

numbers of core available in your processor:4
 Before invoking number of active thread   :0
 After Shutdown  :false
Common Pool Size   :3

Example 2

Test it Now

Output:

|| Finder :0 ||  Shutdown false || Active threads :0 Left  0 Right 0
Next TopicJava ForkJoinPool




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials