   override func selectPutNow(selectionID: Selectable) -> Selection?
   {
     OSSpinLockLock(&lock)
-    if let rs = selectPutNow()
-    {
-      OSSpinLockUnlock(&lock)
-      return Selection(id: selectionID, semaphore: rs)
+    while let rss = readerQueue.dequeue()
+    {
+      switch rss
+      {
+      case .semaphore(let rs):
+        OSSpinLockUnlock(&lock)
+        return Selection(id: selectionID, semaphore: rs)
+
+      case .selection(let c, let extractSelectionID):
+        if let extractSelect = c.get()
+        {
+          OSSpinLockUnlock(&lock)
+          return Selection(id: selectionID, semaphore: insertToExtract(extractSelect, id: extractSelectionID))
+        }
+        // try the next enqueued reader instead
+      }
     }
     OSSpinLockUnlock(&lock)
     return nil
   }
 
-  private func selectPutNow() -> dispatch_semaphore_t?
-  {
-    precondition(lock != 0, __FUNCTION__)
-    while let ssema = readerQueue.dequeue()
-    {
-      switch ssema
-      {
-      case .semaphore(let rs):
-        return rs
-
-      case .selection(let c, let selectionID):
-        if let s = c.get()
-        {
-          OSSpinLockUnlock(&lock)
-          let mediator = SemaphorePool.dequeue()
-          let buffer = UnsafeMutablePointer<T>.alloc(1)
-          dispatch_set_context(mediator, buffer)
-
-          // two select()s talking to each other need a 3rd thread
-          dispatch_async(dispatch_get_global_queue(qos_class_self(), 0)) {
-            dispatch_semaphore_wait(mediator, DISPATCH_TIME_FOREVER)
-            // got awoken by insert()
-            precondition(dispatch_get_context(mediator) == buffer, "Unknown context in \(__FUNCTION__)")
-
-            let selection = Selection(id: selectionID, semaphore: mediator)
-            dispatch_set_context(s, UnsafeMutablePointer<Void>(Unmanaged.passRetained(selection).toOpaque()))
-            dispatch_semaphore_signal(s)
-            dispatch_semaphore_wait(mediator, DISPATCH_TIME_FOREVER)
-            // got awoken by extract()
-            buffer.destroy(1)
-            buffer.dealloc(1)
-            dispatch_set_context(mediator, nil)
-            SemaphorePool.enqueue(mediator)
-          }
-          OSSpinLockLock(&lock)
-          return mediator
-        }
-        else
-        { // try the next enqueued reader instead
-          continue
-        }
-      }
-    }
-    return nil
+  private func insertToExtract(extractSelect: dispatch_semaphore_t, id: Selectable) -> dispatch_semaphore_t
+  {
+    // We have two select() functions talking to eath other. They need an intermediary.
+    let intermediary = SemaphorePool.dequeue()
+    let buffer = UnsafeMutablePointer<T>.alloc(1)
+    dispatch_set_context(intermediary, buffer)
+
+    // two select()s talking to each other need a 3rd thread
+    dispatch_async(dispatch_get_global_queue(qos_class_self(), 0)) {
+      dispatch_semaphore_wait(intermediary, DISPATCH_TIME_FOREVER)
+      // got awoken by insert()
+      precondition(dispatch_get_context(intermediary) == buffer, "Unknown context in \(__FUNCTION__)")
+
+      let selection = Selection(id: id, semaphore: intermediary)
+      dispatch_set_context(extractSelect, UnsafeMutablePointer<Void>(Unmanaged.passRetained(selection).toOpaque()))
+      dispatch_semaphore_signal(extractSelect)
+      dispatch_semaphore_wait(intermediary, DISPATCH_TIME_FOREVER)
+      // got awoken by extract(). clean up.
+      buffer.destroy(1)
+      buffer.dealloc(1)
+      dispatch_set_context(intermediary, nil)
+      SemaphorePool.enqueue(intermediary)
+    }
+
+    // this return value will be sent off to insert()
+    return intermediary
   }
 
   override func insert(selection: Selection, newElement: T) -> Bool

  override func selectPut(semaphore: SemaphoreChan, selectionID: Selectable)
  {
    OSSpinLockLock(&lock)
    if !readerQueue.isEmpty
    {
      if let s = semaphore.get()
      {
        if let rs = selectPutNow()
        {
          let selection = Selection(id: selectionID, semaphore: rs)
          dispatch_set_context(s, UnsafeMutablePointer<Void>(Unmanaged.passRetained(selection).toOpaque()))
        }
        OSSpinLockUnlock(&lock)
        dispatch_semaphore_signal(s)
      }
      else
      {
        OSSpinLockUnlock(&lock)
      }
      return
    }

    if closed
    {
      OSSpinLockUnlock(&lock)
      if let s = semaphore.get()
      {
        dispatch_semaphore_signal(s)
      }
      return
    }

  override func selectGet(semaphore: SemaphoreChan, selectionID: Selectable)
  {
    OSSpinLockLock(&lock)
    while let wss = writerQueue.dequeue()
    {
      switch wss
      {
      case .semaphore(let ws):
        if let select = semaphore.get()
        {
          OSSpinLockUnlock(&lock)
          let selection = Selection(id: selectionID, semaphore: ws)
          dispatch_set_context(select, UnsafeMutablePointer<Void>(Unmanaged.passRetained(selection).toOpaque()))
          dispatch_semaphore_signal(select)
        }
        else
        {
          writerQueue.undequeue(wss)
          OSSpinLockUnlock(&lock)
        }
        return

      case .selection(let c, let insertSelectionID):
        if !c.isEmpty
        {
          if let select = semaphore.get()
          {
            OSSpinLockUnlock(&lock)
            if let insertSelect = c.get()
            {
              let selection = Selection(id: selectionID, semaphore: extractFromInsert(insertSelect, id: insertSelectionID))
              dispatch_set_context(select, UnsafeMutablePointer<Void>(Unmanaged.passRetained(selection).toOpaque()))
            }
            dispatch_semaphore_signal(select)
          }
          else
          {
            writerQueue.undequeue(wss)
            OSSpinLockUnlock(&lock)
          }
          return
        }
      }
    }

    if closed
    {
      OSSpinLockUnlock(&lock)
      if let select = semaphore.get()
      {
        dispatch_semaphore_signal(select)
      }
      return
    }
