anchor.diff:  ;;;-----------------------------------------------------------------------------
   
   (defmethod buffer-flush-output ((buffer single-channel-buffer) &optional timeout)
  -  (with-synchronized-single-channel-buffer (buffer)
  +  (with-synchronized-buffer (buffer :input)
       (when (eql :write (last-io-op-of buffer))
         (%buffer-flush-output buffer timeout))))
   
   (defmethod buffer-flush-output ((buffer dual-channel-buffer) &optional timeout)
  -  (with-synchronized-dual-channel-buffer (buffer :output)
  +  (with-synchronized-buffer (buffer :output)
       (%buffer-flush-output buffer timeout)))
   
   (defmethod %buffer-flush-output ((buffer dual-channel-buffer) timeout)
  
positive.code: (defmethod device-read ((buffer dual-channel-buffer) vector start end
                          &optional timeout)
    (when (= start end) (return-from device-read 0))
    (with-synchronized-dual-channel-buffer (buffer :input)
      (buffer-read-octets buffer buffer start end timeout)))
  
  (defmethod buffer-read-octets ((buffer buffer) vector start end timeout)
  
negative.code: (defmethod device-read ((buffer single-channel-buffer) vector start end
                          &optional timeout)
    (when (= start end) (return-from device-read 0))
    (with-synchronized-buffer (buffer :input)
      ;; If the previous operation was a write, try to flush the output buffer.
      ;; If the buffer couldn't be flushed entirely, signal an error
      (synchronize-input buffer)
  