Method: Orchestrate::Client#in_parallel
- Defined in:
- lib/orchestrate/client.rb
#in_parallel {|accumulator| ... } ⇒ Object
Note:
This method is not Thread-safe. Requests generated from the same
client in different threads while #in_parallel is running will behave
unpredictably. Use #dup
to create per-thread clients.
Performs requests in parallel. Requires using a Faraday adapter that supports parallel requests.
416 417 418 419 420 421 422 |
# File 'lib/orchestrate/client.rb', line 416 def in_parallel(&block) accumulator = {} http.in_parallel do block.call(accumulator) end accumulator end |