Skip to content

Commit 0559cba

Browse files
David Harshapitr-ch
authored andcommitted
Add executor and execute options to zip docs
1 parent d85aaf3 commit 0559cba

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

lib/concurrent/promise.rb

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,14 @@ def flat_map(&block)
383383
# Builds a promise that produces the result of promises in an Array
384384
# and fails if any of them fails.
385385
#
386-
# @param [Array<Promise>] promises
386+
# @overload zip(*promises)
387+
# @param [Array<Promise>] promises
388+
#
389+
# @overload zip(*promises, opts)
390+
# @param [Array<Promise>] promises
391+
# @param [Hash] opts the configuration options
392+
# @option opts [Executor] :executor (ImmediateExecutor.new) when set use the given `Executor` instance.
393+
# @option opts [Boolean] :execute (true) execute promise before returning
387394
#
388395
# @return [Promise<Array>]
389396
def self.zip(*promises)
@@ -407,7 +414,14 @@ def self.zip(*promises)
407414
# Builds a promise that produces the result of self and others in an Array
408415
# and fails if any of them fails.
409416
#
410-
# @param [Array<Promise>] others
417+
# @overload zip(*promises)
418+
# @param [Array<Promise>] others
419+
#
420+
# @overload zip(*promises, opts)
421+
# @param [Array<Promise>] others
422+
# @param [Hash] opts the configuration options
423+
# @option opts [Executor] :executor (ImmediateExecutor.new) when set use the given `Executor` instance.
424+
# @option opts [Boolean] :execute (true) execute promise before returning
411425
#
412426
# @return [Promise<Array>]
413427
def zip(*others)

0 commit comments

Comments
 (0)