Class | Rev::Loop |
In: |
lib/rev/loop.rb
ext/rev/rev_buffer.c |
Parent: | Object |
Rev::TimerWatcher lets you create either one-shot or periodic timers which run within Rev‘s event loop. It‘s useful for creating timeouts or events which fire periodically.
EVFLAG_NOENV | = | 0x1000000 | ||
EVFLAG_FORKCHECK | = | 0x2000000 | ||
EVBACKEND_SELECT | = | 0x00000001 | ||
EVBACKEND_POLL | = | 0x00000002 | ||
EVBACKEND_EPOLL | = | 0x00000004 | ||
EVBACKEND_KQUEUE | = | 0x00000008 | ||
EVBACKEND_PORT | = | 0x00000020 |
watchers | [R] |
Options:
:skip_environment (boolean)
Ignore the $LIBEV_FLAGS environment variable
:fork_check (boolean)
Enable autodetection of forks
:backend
Choose the default backend, one (or many in an array) of: :select (most platforms) :poll (most platforms except Windows) :epoll (Linux) :kqueue (BSD/Mac OS X) :port (Solaris 10)
Run the event loop and dispatch events back to Ruby. If there are no watchers associated with the event loop it will return immediately. Otherwise, run will continue blocking and making event callbacks to watchers until all watchers associated with the loop have been disabled or detached. The loop may be explicitly stopped by calling the stop method on the loop object.
Run the Rev::Loop once, but return immediately if there are no pending events.