class Redis
def _bpop(cmd, args, &blk)
def _bpop(cmd, args, &blk) timeout = if args.last.is_a?(Hash) options = args.pop options[:timeout] elsif args.last.respond_to?(:to_int) # Issue deprecation notice in obnoxious mode... args.pop.to_int end timeout ||= 0 if args.size > 1 # Issue deprecation notice in obnoxious mode... end keys = args.flatten synchronize do |client| command = [cmd, keys, timeout] timeout += client.timeout if timeout > 0 client.call_with_timeout(command, timeout, &blk) end end