default Poller
Normally, end users do not interact directly with the poller. It is used internally by lens.Scheduler to wait on file descriptors and sleep. This poller uses fast poll API and nanosleep for precise operation.
-- # Poller API -- TODO --
.new (reserve)
Create a new poller. Optional reserve
argument is used to reserve slots in memory for items to poll on (default = 8).
.poll (timeout)
Polls for new events with a maximal waiting time of timeout
. Returns true
on success and false
on interruption.
.events ()
Return a table with all event idx or nil. Used after a call to poll.