           OSSpinLockUnlock(&self.lock)
           
           let context = UnsafePointer<T>(dispatch_get_context(ws))
-          if context == nil
-          { // not a normal code path.
-            assert(false, __FUNCTION__)
-            // dispatch_semaphore_signal(nil)
+          switch context
+          {
+          case nil:
+            preconditionFailure(__FUNCTION__)
+
+          default:
+            let element = context.memory
+            dispatch_set_context(ws, nil)
+            dispatch_semaphore_signal(ws)
+
+            let selection = Selection(selectionID: selectionID, selectionData: element)
+            let selectptr = UnsafeMutablePointer<Void>(Unmanaged.passRetained(selection).toOpaque())
+            dispatch_set_context(s, selectptr)
+            dispatch_semaphore_signal(s)
             return
           }
-          let element = context.memory
-          dispatch_set_context(ws, nil)
-          dispatch_semaphore_signal(ws)
-
-          let selection = Selection(selectionID: selectionID, selectionData: element)
-          let selectptr = UnsafeMutablePointer<Void>(Unmanaged.passRetained(selection).toOpaque())
-          dispatch_set_context(s, selectptr)
-          dispatch_semaphore_signal(s)
-          return
         }
         else
         {

      OSSpinLockUnlock(&lock)

      let context = UnsafePointer<T>(dispatch_get_context(ws))
      if context == nil
      { // not a normal code path.
        precondition(false, __FUNCTION__)
        dispatch_semaphore_signal(nil as dispatch_semaphore_t!)
        return nil
      }
      let element = context.memory
      dispatch_semaphore_signal(ws)

      return Selection(selectionID: selectionID, selectionData: element)
    }
    OSSpinLockUnlock(&lock)
    return nil

      dispatch_semaphore_wait(threadLock, DISPATCH_TIME_FOREVER)

      // got awoken
      let context = dispatch_get_context(threadLock)

      switch context
      {
