Javatpoint Logo
Javatpoint Logo

Java CyclicBarrier getNumberWaiting() method

The getNumberWaiting() method of the Java CyclicBarrier class is used to get the number of parties currently waiting at the barrier. This method is primarily useful for debugging and assertions.

Syntax

Return

The number of parties currently blocked in the wait.

Example 1

Test it Now

Output:

Number of parties required to trip the barrier = 3
Sum of product and sum = 0
Is the barrier broken? - false
Number of parties waiting at the barrier at this point = 0
Sum of product and sum = 36
Barrier reset successful
Next Topicjava CyclicBarrier





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