Javatpoint Logo
Javatpoint Logo

Java forkJoinPool getParallelism() Method

The getParallelism() method of ForkJoinPool class is used to get the parallelism level of the common Pool. It returns an integer value representing the parallelism level.

Syntax

Parameter

NA

Returns

The targeted parallelism level of the common pool

Throws

Does not throw the Exception.

Example 1

Test it Now

Output:

Finder :0    Active threads :3 Left  0 Right 0
 Targeted Parallelism  :3

Example 2

Test it Now

Output:

Common Pool Size after  :3
 Parallelism level of pool :3
Is pool use First-in-First-out Scheduling:false
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