Module: DatWorkerPool::Worker

Defined in:
lib/dat-worker-pool/worker.rb

Defined Under Namespace

Modules: ClassMethods, InstanceMethods, TestHelpers

Constant Summary collapse

STANDARD_ERROR_CLASSES =

these are standard error classes that we rescue, handle and don’t reraise in the work loop, this keeps the worker thread from shutting down unexpectedly; Timeout::Error is a common non StandardError exception that should be treated like a StandardError, we don’t want an uncaught Timeout::Error to shutdown a worker thread

[StandardError, Timeout::Error].freeze

Class Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



16
17
18
19
20
21
# File 'lib/dat-worker-pool/worker.rb', line 16

def self.included(klass)
  klass.class_eval do
    extend ClassMethods
    include InstanceMethods
  end
end