class Concurrent::AbstractExecutorService
@!visibility private
@!macro abstract_executor_service_public_api
def auto_terminate=(value)
def auto_terminate=(value) deprecated "Method #auto_terminate= has no effect. Set :auto_terminate option when executor is initialized." end
def auto_terminate?
def auto_terminate? synchronize { @auto_terminate } end
def fallback_action(*args)
-
args
(Array
) -- the arguments to the task which is being handled.
def fallback_action(*args) case fallback_policy when :abort lambda { raise RejectedExecutionError } when :discard lambda { false } when :caller_runs lambda { begin yield(*args) rescue => ex # let it fail log DEBUG, ex end true } else lambda { fail "Unknown fallback policy #{fallback_policy}" } end end
def initialize(opts = {}, &block)
def initialize(opts = {}, &block) super(&nil) synchronize do @auto_terminate = opts.fetch(:auto_terminate, true) @name = opts.fetch(:name) if opts.key?(:name) ns_initialize(opts, &block) end end
def kill
def kill raise NotImplementedError end
def ns_auto_terminate?
def ns_auto_terminate? @auto_terminate end
def ns_execute(*args, &task)
def ns_execute(*args, &task) raise NotImplementedError end
def ns_kill_execution
Callback method called when the executor has been killed.
@!macro executor_service_method_ns_kill_execution
def ns_kill_execution # do nothing end
def ns_shutdown_execution
Callback method called when an orderly shutdown has completed.
@!macro executor_service_method_ns_shutdown_execution
def ns_shutdown_execution # do nothing end
def running?
def running? synchronize { ns_running? } end
def shutdown
def shutdown raise NotImplementedError end
def shutdown?
def shutdown? synchronize { ns_shutdown? } end
def shuttingdown?
def shuttingdown? synchronize { ns_shuttingdown? } end
def to_s
def to_s name ? "#{super[0..-2]} name: #{name}>" : super end
def wait_for_termination(timeout = nil)
def wait_for_termination(timeout = nil) raise NotImplementedError end