Java ForkJoinPool getAsyncMode() MethodThe getAsyncMode() method is used to check if the pool uses First-in-First-out scheduling for forked tasks that are never joined. If yes, then it returns true otherwise false. Syntax:Parameter:Task - the task to execute. Returns:true if this pool uses async mode Throws:Does not throw the exception. Example 1Test it NowOutput: Finder :0 Active threads :3 Left 0 Right 0 Is pool use First-in-First-out Scheduling: false Example 2Test it NowOutput: Common Pool Size before :0 Common Pool Size after :3 Is pool use First-in-First-out Scheduling: false
Next Topic#
|