class Async::Container::Thread::Exit

Used to propagate the exit status of a child process invoked by {Instance#exec}.

Attributes

status[R]

The process exit status. @attribute [::Process::Status]

Public Class Methods

new(status) click to toggle source

Initialize the exit status. @parameter status [::Process::Status] The process exit status.

# File lib/async/container/thread.rb, line 35
def initialize(status)
        @status = status
end

Public Instance Methods

error() click to toggle source

The process exit status if it was an error. @returns [::Process::Status | Nil]

# File lib/async/container/thread.rb, line 45
def error
        unless status.success?
                status
        end
end