 
   override func selectPutNow(selection: Selection) -> Selection?
   {
-    return writerCount == 0 ? selection : nil
+    return closedState == 0 && writerCount == 0 ? selection : nil
   }
 
   override func insert(selection: Selection, newElement: T) -> Bool


  override func put(newElement: T) -> Bool
  {
    if writerCount == 0 && OSAtomicCompareAndSwap32Barrier(0, 1, &writerCount)
    { // Only one thread can get here
      element = newElement
      close() // also increments the 'barrier' semaphore


  override func get() -> T?
  {
    if closedState == 0 && writerCount == 0
    {
      dispatch_group_wait(barrier, DISPATCH_TIME_FOREVER)
    }
    assert(writerCount != 0 || closedState != 0, __FUNCTION__)

    if readerCount == 0 && OSAtomicCompareAndSwap32Barrier(0, 1, &readerCount)
    { // Only one thread can get here.
