Skip to content

Commit eb59b82

Browse files
committed
Documentation coverage.
1 parent 077624a commit eb59b82

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/async/http/faraday/adapter.rb

+6
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,22 @@ def read
5050
end
5151
end
5252

53+
# Implement the Faraday parallel manager interface, using Async.
5354
class ParallelManager
55+
# Create a new parallel manager.
5456
def initialize(options = {})
5557
@options = options
5658
@barrier = nil
5759
end
5860

61+
# @deprecated Please update your Faraday version!
5962
def run
6063
if $VERBOSE
6164
warn "Please update your Faraday version!", uplevel: 2
6265
end
6366
end
6467

68+
# Run the given block asynchronously, using the barrier if available.
6569
def async(&block)
6670
if @barrier
6771
@barrier.async(&block)
@@ -70,6 +74,7 @@ def async(&block)
7074
end
7175
end
7276

77+
# Execute the given block which can perform multiple concurrent requests, waiting for them all to complete.
7378
def execute(&block)
7479
Sync do
7580
@barrier = Async::Barrier.new
@@ -87,6 +92,7 @@ def execute(&block)
8792
class Adapter < ::Faraday::Adapter
8893
self.supports_parallel = true
8994

95+
# Create a new parallel manager, which is used to handle multiple concurrent requests.
9096
def self.setup_parallel_manager(**options)
9197
ParallelManager.new(options)
9298
end

0 commit comments

Comments
 (0)