public override void Lock() { var caller = Thread.CurrentThread; lock (this) { if (GetHold(caller)) return; } var n = new WaitNode(); n.DoWaitUninterruptibly(this); }