class Async::Wrapper
@deprecated With no replacement. Prefer native interfaces.
Represents an asynchronous IO within a reactor.
def close
def close @io.close end
def closed?
def closed? @io.closed? end
def dup
def dup self.class.new(@io.dup) end
def initialize(io, reactor = nil)
@parameter io the native object to wrap.
def initialize(io, reactor = nil) @io = io @reactor = reactor @timeout = nil end
def wait_any(timeout = @timeout)
Wait fo the io to become either readable or writable.
def wait_any(timeout = @timeout) @io.to_io.wait(::IO::READABLE|::IO::WRITABLE|::IO::PRIORITY, timeout) or raise TimeoutError end
def wait_priority(timeout = @timeout)
def wait_priority(timeout = @timeout) @io.to_io.wait_priority(timeout) or raise TimeoutError end
def wait_readable(timeout = @timeout)
def wait_readable(timeout = @timeout) @io.to_io.wait_readable(timeout) or raise TimeoutError end
def wait_writable(timeout = @timeout)
def wait_writable(timeout = @timeout) @io.to_io.wait_writable(timeout) or raise TimeoutError end