Class | Coolio::Loop |
In: |
lib/cool.io/loop.rb
|
Parent: | Object |
EVFLAG_NOENV | = | 0x1000000 | ||
EVFLAG_FORKCHECK | = | 0x2000000 | ||
EVBACKEND_SELECT | = | 0x00000001 | ||
EVBACKEND_POLL | = | 0x00000002 | ||
EVBACKEND_EPOLL | = | 0x00000004 | ||
EVBACKEND_KQUEUE | = | 0x00000008 | ||
EVBACKEND_PORT | = | 0x00000020 |
Create a new Coolio::Loop
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.