Files

Class/Module Index [+]

Quicksearch

Concurrent::RubyExecutorService

@!macro abstract_executor_service_public_api @!visibility private

Attributes

stop_event[R]
stopped_event[R]

Public Class Methods

new(*args, &block) click to toggle source
# File lib/concurrent/executor/executor_service.rb, line 365
def initialize(*args, &block)
  super
  @stop_event    = Event.new
  @stopped_event = Event.new
  ensure_ivar_visibility!
end

Public Instance Methods

kill() click to toggle source
# File lib/concurrent/executor/executor_service.rb, line 392
def kill
  synchronize do
    break if shutdown?
    self.ns_auto_terminate = false
    stop_event.set
    kill_execution
    stopped_event.set
  end
  true
end
shutdown() click to toggle source
# File lib/concurrent/executor/executor_service.rb, line 382
def shutdown
  synchronize do
    break unless running?
    self.ns_auto_terminate = false
    stop_event.set
    shutdown_execution
  end
  true
end
wait_for_termination(timeout = nil) click to toggle source
# File lib/concurrent/executor/executor_service.rb, line 403
def wait_for_termination(timeout = nil)
  stopped_event.wait(timeout)
end

Protected Instance Methods

ns_running?() click to toggle source
# File lib/concurrent/executor/executor_service.rb, line 415
def ns_running?
  !stop_event.set?
end
ns_shutdown?() click to toggle source
# File lib/concurrent/executor/executor_service.rb, line 423
def ns_shutdown?
  stopped_event.set?
end
ns_shuttingdown?() click to toggle source
# File lib/concurrent/executor/executor_service.rb, line 419
def ns_shuttingdown?
  !(ns_running? || ns_shutdown?)
end
shutdown_execution() click to toggle source
# File lib/concurrent/executor/executor_service.rb, line 411
def shutdown_execution
  stopped_event.set
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.