From 0559cbacce1dce2fcde2dc7c7b9f9f166abe1549 Mon Sep 17 00:00:00 2001 From: David Harsha Date: Thu, 21 Dec 2017 11:08:15 -0800 Subject: [PATCH] Add `executor` and `execute` options to zip docs --- lib/concurrent/promise.rb | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) 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)