0

I like to know that is there a way to know the number of threads waiting on a condition variable from the condition variable itself, without using some "count" variable?

sow_gali
  • 89
  • 7

1 Answers1

0

No, because in general the number of waiting threads is not reliable even without notifications occurring: right after you retrieve this number a new thread can start waiting or a thread waiting with timeout can stop waiting.

dewaffled
  • 2,850
  • 2
  • 17
  • 30