Module: Garcon::Executor

Included in:
RubyExecutor, SerialExecutor
Defined in:
lib/garcon/task/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_POLICY`.



28
29
30
# File 'lib/garcon/task/executor.rb', line 28

def fallback_policy
  @fallback_policy
end

Instance Method Details

#auto_terminate?Boolean

Returns:



79
80
81
# File 'lib/garcon/task/executor.rb', line 79

def auto_terminate?
  !! @auto_terminate
end

#can_overflow?Boolean

Note:

Always returns ‘false`

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.



37
38
39
# File 'lib/garcon/task/executor.rb', line 37

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.



75
76
77
# File 'lib/garcon/task/executor.rb', line 75

def serialized?
  false
end