Module: Concurrent::Promises::Future::ThrottleIntegration
- Included in:
- Concurrent::Promises::Future
- Defined in:
- lib/concurrent/edge/throttle.rb
Instance Method Summary (collapse)
-
- (Promises::Future) rescue_throttled_by(throttle, *args, &block)
Behaves as #rescue but the it is throttled.
-
- (Promises::Future) then_throttled_by(throttle, *args, &block)
Behaves as #then but the it is throttled.
Instance Method Details
- (Promises::Future) rescue_throttled_by(throttle, *args, &block)
Behaves as Concurrent::Promises::Future#rescue but the it is throttled.
184 185 186 |
# File 'lib/concurrent/edge/throttle.rb', line 184 def rescue_throttled_by(throttle, *args, &block) throttled_by(throttle) { |trigger| trigger.rescue(*args, &block) } end |
- (Promises::Future) then_throttled_by(throttle, *args, &block)
Behaves as Concurrent::Promises::Future#then but the it is throttled.
177 178 179 |
# File 'lib/concurrent/edge/throttle.rb', line 177 def then_throttled_by(throttle, *args, &block) throttled_by(throttle) { |trigger| trigger.then(*args, &block) } end |