module MultiRedis

Constants

VERSION

Attributes

redis[RW]

Public Class Methods

execute(*args) { || ... } click to toggle source
# File lib/multi_redis.rb, line 10
def self.execute *args, &block

  options = args.last.kind_of?(Hash) ? args.pop : {}

  executor = nil
  @mutex.synchronize do
    @executor = Executor.new options
    args.each{ |op| @executor.add op }
    yield if block_given?
    executor = @executor
    @executor = nil
  end

  executor.execute
end

Private Class Methods

executing?() click to toggle source
# File lib/multi_redis.rb, line 35
def self.executing?
  !!@executor
end
executor() click to toggle source
# File lib/multi_redis.rb, line 31
def self.executor
  @executor
end