class Dalli::Protocol::Base

def drain_pipeline_responses(results)

Populates the provided results hash directly to avoid allocation overhead.
Used during interleaved pipelined gets to prevent buffer deadlock.
Non-blocking read and processing of any available pipeline responses.
def drain_pipeline_responses(results)
  return unless connected?
  # Non-blocking check if socket has data available
  return unless sock.wait_readable(0)
  # Read available data without blocking
  response_buffer.read
  # Process any complete responses in the buffer
  loop do
    status, cas, key, value = response_buffer.process_single_getk_response
    break if status.nil? # No complete response available
    results[key] = [value, cas] unless key.nil?
  end
rescue SystemCallError, Dalli::NetworkError
  # Ignore errors during drain - they'll be handled in fetch_responses
  nil
end