shutdownNow() MethodThe shutdownNow() method of ForkJoinPool class attempts to cancel and/or stop all tasks, and reject all subsequently submitted tasks. SyntaxParameterNo parameter is passed. ReturnsAn empty list ThrowDoes not throw the exception. Example 1Test it NowOutput: numbers of core available in your processor:4 Before invoking number of active thread :0 After Shutdown :false Common Pool Size :3 Example 2Test it NowOutput: || Finder :0 || Shutdown false || Active threads :0 Left 0 Right 0
Next TopicJava ForkJoinPool
|