The doctor will see you now… [WaitingRoom is a reusable synchronization object for .NET]


This blog has moved to a new location and comments have been disabled.

All old posts, new posts, and comments can be found on The blog of dlaa.me.

See you there!

Comments (4)

  1. Delay's Blog says:

    Last week, I released the ComputeFileHashes tool for calculating file checksums . (To read more about

  2. wekempf says:

    This type of synchronization object is known as a Gate.  The implementation is fairly well done, but you should change the if statements surrounding the Wait calls to while statements.  This guards against what’s called "spurious wake ups".

  3. Delay says:

    [Belated update:]

    wekempf and I exchanged a number of emails in February of 2009 discusing his recommendation to use "while" statements above. Summarizing briefly, his concern about "spurious wake-ups" is valid on other platforms (ex: UNIX), but is NOT valid for Microsoft's .NET implementation on the desktop or Silverlight. That said, alternate implementations of .NET by others for other platforms (ex: Mono) *could* introduce spurious wake-ups (though I think it would be in violation of the documentation (if not the specification) to do so). Therefore, using "while" would be safer, but is currently not known to be necessary on existing implementations.