Module: Concurrent::Executor

Included in:
JavaExecutor, PerThreadExecutor, RubyExecutor, SerialExecutor
Defined in:
lib/concurrent/executor/executor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#fallback_policyObject (readonly)

The policy defining how rejected tasks (tasks received once the queue size reaches the configured ‘max_queue`, or after the executor has shut down) are handled. Must be one of the values specified in `FALLBACK_POLICIES`.



12
13
14
# File 'lib/concurrent/executor/executor.rb', line 12

def fallback_policy
  @fallback_policy
end

Instance Method Details

#can_overflow?Boolean

Note:

Always returns ‘false`

Does the task queue have a maximum size?

Returns:

  • (Boolean)

    True if the task queue has a maximum size else false.



21
22
23
# File 'lib/concurrent/executor/executor.rb', line 21

def can_overflow?
  false
end

#serialized?Boolean

Note:

Always returns ‘false`

Does this executor guarantee serialization of its operations?

Returns:

  • (Boolean)

    True if the executor guarantees that all operations will be post in the order they are received and no two operations may occur simultaneously. Else false.



59
60
61
# File 'lib/concurrent/executor/executor.rb', line 59

def serialized?
  false
end