class Redis
def _bpop(cmd, args)
def _bpop(cmd, args) options = {} case args.last when Hash options = args.pop when Integer # Issue deprecation notice in obnoxious mode... options[:timeout] = args.pop end if args.size > 1 # Issue deprecation notice in obnoxious mode... end keys = args.flatten timeout = options[:timeout] || 0 synchronize do |client| command = [cmd, keys, timeout] timeout += client.timeout if timeout > 0 client.call_with_timeout(command, timeout) end end