class Concurrent::Throttle::ProxyExecutor
Public Class Methods
Source
# File lib/concurrent-ruby-edge/concurrent/edge/throttle.rb, line 192 def initialize(throttle, executor) super() @Throttle = throttle @Executor = executor end
Calls superclass method
Public Instance Methods
Source
# File lib/concurrent-ruby-edge/concurrent/edge/throttle.rb, line 206 def can_overflow? @Executor.can_overflow? end
Source
# File lib/concurrent-ruby-edge/concurrent/edge/throttle.rb, line 198 def post(*args, &task) if (event = @Throttle.acquire_or_event) event.on_resolution! { inner_post(*args, &task) } else inner_post(*args, &task) end end
Source
# File lib/concurrent-ruby-edge/concurrent/edge/throttle.rb, line 210 def serialized? @Executor.serialized? end
Private Instance Methods
Source
# File lib/concurrent-ruby-edge/concurrent/edge/throttle.rb, line 216 def inner_post(*arguments, &task) @Executor.post(*arguments) do |*args| begin task.call(*args) ensure @Throttle.release end end end