The best answer I have come up with is to use named semaphores in pairs. The second one of the pair is used to count processes waiting on the first. You post to the second just before waiting on the first, incrementing the count. When you are done, you do a wait on the second semaphore just before doing the post to the first, releasing it. The wait on the counting semaphore will never actually wait, because the first thing that thread did was to increment it. Instead it just decrements the count of threads using the first semaphore. Any monitoring process can open the counting semaphore and use getvalue to check the count.