class Async::Container::Threaded::Child
def initialize(name: nil)
Initialize the thread.
def initialize(name: nil) super() @status = nil @thread = yield(self) @thread.report_on_exception = false @thread.name = name @waiter = ::Thread.new do begin @thread.join rescue Exit => exit finished(exit.error) rescue Interrupt # Graceful shutdown. finished rescue Exception => error finished(error) else finished end end end