Method: BackPressure::Executor#execute

Defined in:
lib/back_pressure/executor.rb

#execute(blocking_time_limit: nil) ⇒ Boolean

Executes the provided block, after waiting out any back-pressure, returning true IFF the block was executed.

Parameters:

  • blocking_time_limit (Number) (defaults to: nil)

    : the maximum time to wait, in seconds, when back-pressure is being applied, before aborting (optional).

Yield Returns:

  • (void)

    : the value returned by the block is ignored by this method.

Returns:

  • (Boolean)

    : returns true if block was successfully executed, and false if tht blocking_time_limit was reached before it could be executed.

Since:

  • 1.0.0



48
49
50
# File 'lib/back_pressure/executor.rb', line 48

def execute(blocking_time_limit: nil)
  fail NotImplementedError
end