title: How can I subclass WaitHandle?
body: <p>Is it possible (in a meaningful way) ?</p>
  
  <p>For example, say I'd like to implement a waitable queue as follows:</p>
  
  <pre><code>public class WaitableQueue : WaitHandle {
      public WaitableQueue() {
        q = new Queue();
      }
  
      public void Enqueue(Object Arg) {
        lock(this) {
          q.Enqueue(Arg);
          // set the waithandle here (how?)
        }
      }
  
      public Type Dequeue() {
        lock(this) {
          if(q.Count == 1)
          // reset the waithandle here (how?)
          return q.Dequeue();
        }
      }
  
      Queue q;
    }
  </code></pre>