         return e
       }
     }
-
     return nil
   }
 


  override func extract(selection: Selection) -> T?
  {
    assert(writerCount != 0 || closedState != 0, __FUNCTION__)
    if readerCount == 0 && OSAtomicCompareAndSwap32Barrier(0, 1, &readerCount)
    { // Only one thread can get here.
      if let e = element
      {
        element = nil
        return e
      }
    }
    return nil
  }

  override func selectGet(select: ChannelSemaphore, selection: Selection)

    {
      dispatch_group_wait(barrier, DISPATCH_TIME_FOREVER)
    }

    return getElement()
  }

  private func getElement() -> T?
  {
    assert(writerCount != 0 || closedState != 0, __FUNCTION__)
    if readerCount == 0 && OSAtomicCompareAndSwap32Barrier(0, 1, &readerCount)
    { // Only one thread can get here.
      if let e = element
