class ActiveConcurrency::Processes::Worker
Attributes
status[R]
Public Class Methods
new(name: nil)
click to toggle source
Calls superclass method
ActiveConcurrency::Base::Worker::new
# File lib/active_concurrency/processes/worker.rb, line 9 def initialize(name: nil) super(name: name) @status = 'run' end
Public Instance Methods
exit!()
click to toggle source
# File lib/active_concurrency/processes/worker.rb, line 14 def exit! Process.waitpid(@process) unless @process.nil? @status = false end
join()
click to toggle source
# File lib/active_concurrency/processes/worker.rb, line 19 def join @process = Process.fork do perform at_exit { exit! } end end