Javatpoint Logo
Javatpoint Logo

Java ForkJoinPool getAsyncMode() Method

The 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 1

Test it Now

Output:

Finder :0    Active threads :3 Left  0 Right 0
Is pool use First-in-First-out Scheduling: false

Example 2

Test it Now

Output:

Common Pool Size before  :0
Common Pool Size after  :3
Is pool use First-in-First-out Scheduling: false

Next Topic#





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