Skip to content

Commit

Permalink
Add executor and execute options to zip docs
Browse files Browse the repository at this point in the history
  • Loading branch information
David Harsha authored and pitr-ch committed Feb 24, 2018
1 parent d85aaf3 commit 0559cba
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions lib/concurrent/promise.rb
Expand Up @@ -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<Promise>] promises
# @overload zip(*promises)
# @param [Array<Promise>] promises
#
# @overload zip(*promises, opts)
# @param [Array<Promise>] 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<Array>]
def self.zip(*promises)
Expand All @@ -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<Promise>] others
# @overload zip(*promises)
# @param [Array<Promise>] others
#
# @overload zip(*promises, opts)
# @param [Array<Promise>] 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<Array>]
def zip(*others)
Expand Down

0 comments on commit 0559cba

Please sign in to comment.