Closed hboon closed 9 years ago
From README:
d1 = EM::DefaultDeferrable.new d2 = EM::DefaultDeferrable.new d = EM::DependentDeferrable.on(d1, d2) d.callback {|a, b| puts "a: #{a} b: #{b}"} d1.succeed 'one', 'one more' d2.succeed :two
Prints: a: ["one", "one more"] b: [:two]
Sweet! Thanks for the contribution!
From README:
d1 = EM::DefaultDeferrable.new d2 = EM::DefaultDeferrable.new d = EM::DependentDeferrable.on(d1, d2) d.callback {|a, b| puts "a: #{a} b: #{b}"} d1.succeed 'one', 'one more' d2.succeed :two
Prints: a: ["one", "one more"] b: [:two]