         }
       }
 
-      if self.closed { pthread_cond_signal(self.readCondition) }
+      if self.blockedReaders > 0
+      { // If other readers are waiting, signal a writer right away.
+        if self.blockedWriters > 0 { pthread_cond_signal(self.writeCondition) }
+        // If channel is closed, then signal a reader too.
+        if self.isClosed { pthread_cond_signal(self.readCondition) }
+      }
       pthread_mutex_unlock(self.channelMutex)
-
-//    log("read from 0-channel")
     }
 
     return {
-      pthread_mutex_lock(self.channelMutex)
-      pthread_cond_broadcast(self.readCondition)
-      pthread_mutex_unlock(self.channelMutex)
+      if self.blockedReaders > 0
+      {
+        pthread_mutex_lock(self.channelMutex)
+        pthread_cond_broadcast(self.readCondition)
+        pthread_mutex_unlock(self.channelMutex)
+      }
     }
   }
 }
+
+// Used to elucidate/troubleshoot message arrival order
+private var readerCount = 0

  }
}

extension SelectChan: SelectionChannel
{
  /**
    selectMutex() must be used to send data to SelectChan in a thread-safe manner
  */

  public func selectMutex(action: () -> ())

  // Instance variables

  private var closed = false
  private var blockedReaders = 0
  private var blockedWriters = 0

  private var channelMutex:   UnsafeMutablePointer<pthread_mutex_t>
  private var readCondition:  UnsafeMutablePointer<pthread_cond_t>
