public LockAwaitable GetAwaiter()
 {
     lock (this) {
         var awaitable = new LockAwaitable();
         if (Owner == null)
         {
             ScheduleAwaitable(awaitable);
         }
         else
         {
             Queue.AddLast(awaitable);
         }
         return(awaitable);
     }
 }
 private void ScheduleAwaitable(LockAwaitable awaitable)
 {
     awaitable.Result = Owner = new LockHolder(this);
     awaitable.NotifyCompletion();
 }