           // We don't know whether said next thread *actually* needs to be awoken.
           // Perhaps better smarts need to exist. As a workaround, a thread that gets
           // awoken but didn't need to will un-dequeue its semaphore and go back to sleep.
+          OSSpinLockLock(&self.lock)
           if let ws = self.writerQueue.dequeue() { dispatch_semaphore_signal(ws) }
+          OSSpinLockUnlock(&self.lock)
           return
         }
         OSSpinLockLock(&self.lock)

          // We don't know whether said next thread *actually* needs to be awoken.
          // Perhaps better smarts need to exist. As a workaround, a thread that gets
          // awoken but didn't need to will un-dequeue its semaphore and go back to sleep.
          if let rs = self.readerQueue.dequeue() { dispatch_semaphore_signal(rs) }
          return
        }
        OSSpinLockLock(&self.lock)

          dispatch_semaphore_wait(threadLock, DISPATCH_TIME_FOREVER)
          if dispatch_get_context(threadLock) == abortSelect
          {
            OSSpinLockLock(&self.lock)
            if let ws = self.writerQueue.dequeue() { dispatch_semaphore_signal(ws) }
            OSSpinLockUnlock(&self.lock)
            return
          }
        }
