diff --git a/lib/concurrent/promise.rb b/lib/concurrent/promise.rb index a69432fdb..77a658bbc 100644 --- a/lib/concurrent/promise.rb +++ b/lib/concurrent/promise.rb @@ -383,7 +383,14 @@ def flat_map(&block) # Builds a promise that produces the result of promises in an Array # and fails if any of them fails. # - # @param [Array] promises + # @overload zip(*promises) + # @param [Array] promises + # + # @overload zip(*promises, opts) + # @param [Array] promises + # @param [Hash] opts the configuration options + # @option opts [Executor] :executor (ImmediateExecutor.new) when set use the given `Executor` instance. + # @option opts [Boolean] :execute (true) execute promise before returning # # @return [Promise] def self.zip(*promises) @@ -407,7 +414,14 @@ def self.zip(*promises) # Builds a promise that produces the result of self and others in an Array # and fails if any of them fails. # - # @param [Array] others + # @overload zip(*promises) + # @param [Array] others + # + # @overload zip(*promises, opts) + # @param [Array] others + # @param [Hash] opts the configuration options + # @option opts [Executor] :executor (ImmediateExecutor.new) when set use the given `Executor` instance. + # @option opts [Boolean] :execute (true) execute promise before returning # # @return [Promise] def zip(*others)