Method: Redis#multi

Defined in:
lib/redis.rb

#multiObject

Mark the start of a transaction block.



1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
# File 'lib/redis.rb', line 1008

def multi
  synchronize do
    if !block_given?
      @client.call :multi
    else
      result = pipelined(:raise => false) do
        multi
        yield(self)
        exec
      end

      result.last
    end
  end
end