       OSSpinLockLock(&self.lock)
       if let rs = self.readerQueue.dequeue()
       {
-        if let s = semaphore.get()
-        {
-          OSSpinLockUnlock(&self.lock)
-
-          let context = dispatch_get_context(rs)
-          switch context
-          {
-          case nil:
-            preconditionFailure(__FUNCTION__)
-
-          case waitSelect:
-            break
-
-          default:
+        let context = dispatch_get_context(rs)
+        switch context
+        {
+        case nil:
+          preconditionFailure(__FUNCTION__)
+
+        case waitSelect:
+          if let s = semaphore.get()
+          {
+            OSSpinLockUnlock(&self.lock)
+            dispatch_set_context(threadLock, waitSelect)
+            let contextptr = UnsafeMutablePointer<Void>(Unmanaged.passRetained(threadLock).toOpaque())
+            dispatch_set_context(rs, contextptr)
+            dispatch_semaphore_signal(rs)
+            dispatch_semaphore_wait(threadLock, DISPATCH_TIME_FOREVER)
+
+            let context = dispatch_get_context(threadLock)
+            switch context
+            {
+            case nil:
+              dispatch_set_context(s, nil)
+              dispatch_semaphore_signal(s)
+
+            default:
+              let rs = Unmanaged<dispatch_semaphore_t>.fromOpaque(COpaquePointer(context)).takeRetainedValue()
+              let selection = Selection(selectionID: selectionID, selectionData: rs)
+              let selectptr = UnsafeMutablePointer<Void>(Unmanaged.passRetained(selection).toOpaque())
+              dispatch_set_context(s, selectptr)
+              dispatch_semaphore_signal(s)
+            }
+          }
+          else
+          {
+            self.readerQueue.undequeue(rs)
+            // The spinlock stayed locked between dequeue() and undequeue(),
+            // so it was transparent to other threads.
+            OSSpinLockUnlock(&self.lock)
+          }
+
+        default:
+          if let s = semaphore.get()
+          {
+            OSSpinLockUnlock(&self.lock)
             let selection = Selection(selectionID: selectionID, selectionData: rs)
             let selectptr = UnsafeMutablePointer<Void>(Unmanaged.passRetained(selection).toOpaque())
             dispatch_set_context(s, selectptr)
             dispatch_semaphore_signal(s)
-            return
-          }
-        }
-        else
-        {
-          self.readerQueue.undequeue(rs)
-          // The spinlock stayed locked between dequeue() and undequeue(),
-          // so it was transparent to other threads.
-          OSSpinLockUnlock(&self.lock)
-          return
-        }
+          }
+          else
+          {
+            self.readerQueue.undequeue(rs)
+            // The spinlock stayed locked between dequeue() and undequeue(),
+            // so it was transparent to other threads.
+            OSSpinLockUnlock(&self.lock)
+          }
+        }
+        return
       }
 
       if self.closed

      OSSpinLockLock(&self.lock)
      if let ws = self.writerQueue.dequeue()
      {
        if let s = semaphore.get()
        {
          OSSpinLockUnlock(&self.lock)
          
          let context = dispatch_get_context(ws)
          switch context
          {
          case nil:
            preconditionFailure(__FUNCTION__)

          default:
            let element: T = UnsafePointer(context).memory
            dispatch_semaphore_signal(ws)


        preconditionFailure("Context is invalid in \(__FUNCTION__)")

      case waitSelect:
        // waitSelect has a significant chance of failure, but the selectPutNow() path should work "all" the time.
        readerQueue.undequeue(rs)

      default:
