public override void Unlock() { var caller = Thread.CurrentThread; for (;;) { var w = GetSignallee(caller); if (w == null) return; // no one to signal if (w.Signal(this)) return; // notify if still waiting, else skip } }