def read_events(blocking = true)
      size = 1024
      eventlist = FFI::MemoryPointer.new(Native::KEvent, size)

      timeout = blocking ? nil : NULL_TIMEOUT
      res = Native.kevent(@fd, nil, 0, eventlist, size, timeout)

      KQueue.handle_error if res < 0
      (0...res).map {|i| KQueue::Event.new(Native::KEvent.new(eventlist[i]), self)}
    end
def read_events(blocking = true)
      size = 1024
      eventlist = FFI::MemoryPointer.new(Native::KEvent, size)

      timeout = blocking ? nil : NULL_TIMEOUT
      res = Native.kevent(@fd, nil, 0, eventlist, size, timeout)

      KQueue.handle_error if res < 0
      (0...res).map {|i| KQueue::Event.new(Native::KEvent.new(eventlist[i]), self)}
    end
Blocks until there are one or more filesystem events
 that this notifier has watchers registered for.
 Once there are events, returns their {Event} objects.

 @private