module LightIO::Wrap::IOWrapper::ClassMethods

Protected Instance Methods

wrap_blocking_method(method) click to toggle source

wrap blocking method with “#{method}_nonblock”

@param [Symbol] method method name, example: wait

# File lib/lightio/wrap.rb, line 61
def wrap_blocking_method(method)
  define_method method do |*args|
    wait_nonblock(:"#{method}_nonblock", *args)
  end
end
wrap_blocking_methods(*methods) click to toggle source
# File lib/lightio/wrap.rb, line 67
def wrap_blocking_methods(*methods)
  methods.each {|m| wrap_blocking_method(m)}
end