module Async::IO
Constants
Public Class Methods
file_descriptor_limit()
click to toggle source
# File lib/async/io.rb, line 34 def self.file_descriptor_limit Process.getrlimit(Process::RLIMIT_NOFILE).first end
pipe()
click to toggle source
# File lib/async/io/generic.rb, line 43 def self.pipe ::IO.pipe.map(&Generic.method(:new)) end
try_convert(io, &block)
click to toggle source
Convert a Ruby ::IO object to a wrapped instance:
# File lib/async/io/generic.rb, line 35 def self.try_convert(io, &block) if wrapper_class = Generic::WRAPPERS[io.class] wrapper_class.new(io, &block) else raise ArgumentError.new("Unsure how to wrap #{io.class}!") end end