       return element
 
     default:
+      buffer.dealloc(1)
       preconditionFailure("Weird context value in \(__FUNCTION__)")
     }
   }

        }
        return

      case COpaquePointer(cancelSelect):
        // no need to try for the semaphore.
        break

      default:
        let selectget = Unmanaged<dispatch_semaphore_t>.fromOpaque(context).takeRetainedValue()
        if let s = semaphore.get()
        {
          let selection = Selection(selectionID: selectionID, selectionData: selectget)

    OSSpinLockLock(&lock)
    if let ws = writerQueue.dequeue()
    {
      let context = dispatch_get_context(ws)
      switch context
      {
      case nil, cancelSelect:
        preconditionFailure(__FUNCTION__)

      case waitSelect:
        writerQueue.undequeue(ws)

      default:
        OSSpinLockUnlock(&lock)
        let element: T = UnsafePointer(context).memory
        dispatch_semaphore_signal(ws)
        return Selection(selectionID: selectionID, selectionData: element)
      }
