Class: Redis::MultiFuture

Inherits:
Future
  • Object
show all
Defined in:
lib/redis/pipeline.rb

Constant Summary

Constants inherited from Future

Future::FutureNotReady

Instance Method Summary collapse

Methods inherited from Future

#class, #inspect, #is_a?, #value

Constructor Details

#initialize(futures) ⇒ MultiFuture

Returns a new instance of MultiFuture.



114
115
116
117
118
# File 'lib/redis/pipeline.rb', line 114

def initialize(futures)
  @futures = futures
  @command = [:exec]
  @object = FutureNotReady
end

Instance Method Details

#_set(replies) ⇒ Object



120
121
122
123
124
125
126
127
# File 'lib/redis/pipeline.rb', line 120

def _set(replies)
  if replies
    @futures.each_with_index do |future, index|
      future._set(replies[index])
    end
  end
  @object = replies
end