WaitHandles for the confused
I put up a somewhat old writeup on the ManualResetEvent and AutoResetEvent on my full blog, thought since it was .net, I'd post here as well. Here's an excerpt:
Confused about WaitHandles? Sure you are. For one, they have the word "Event" on them.. Are they events? Do they call delegates?. For another, what's this "Reset" action, and why would I want to do it manually? And lastly, what does the documentation mean when it says "Signaled" and "Nonsignaled"? In project [codename] you see a good number of calls to WaitHandle-derived objects , both AutoReset and ManualReset. As the interaction can be somewhat complex, it can be difficult to decipher what is going on. Hopefully this simplified example will help clear things up.
You can find it here if you're interested. It really was written for interns, but if you've never used them, you might find it useful.