Javatpoint Logo
Javatpoint Logo

shutdownNow() Method

The shutdownNow() method of ForkJoinPool class attempts to cancel and/or stop all tasks, and reject all subsequently submitted tasks.

Syntax

Parameter

No parameter is passed.

Returns

An empty list

Throw

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





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA