--- cvsroot/EV/EV.pm 2007/11/01 17:17:32 1.20 +++ cvsroot/EV/EV.pm 2007/11/02 22:18:49 1.25 @@ -62,7 +62,7 @@ use strict; BEGIN { - our $VERSION = '0.1'; + our $VERSION = '0.5'; use XSLoader; XSLoader::load "EV", $VERSION; } @@ -152,9 +152,13 @@ its name, e.g. EV::io has a non-starting variant EV::io_ns and so on. Please note that a watcher will automatically be stopped when the watcher -object is returned, so you I to keep the watcher objects returned by +object is destroyed, so you I to keep the watcher objects returned by the constructors. +Also, all methods changing some aspect of a watcher (->set, ->priority, +->fh and so on) automatically stop and start it again if it is active, +which means pending events get lost. + =head2 WATCHER TYPES Now lets move to the existing watcher types and asociated methods. @@ -186,8 +190,20 @@ =item $old_cb = $w->cb ($new_cb) -Queries the callback on the watcher and optionally changes it. You cna do -this at any time. +Queries the callback on the watcher and optionally changes it. You can do +this at any time without the watcher restarting. + +=item $current_priority = $w->priority + +=item $old_priority = $w->priority ($new_priority) + +Queries the priority on the watcher and optionally changes it. Pending +watchers with higher priority will be invoked first. The valid range of +priorities lies between EV::MAXPRI (default 2) and EV::MINPRI (default +-2). If the priority is outside this range it will automatically be +normalised to the nearest valid priority. + +The default priority of any newly-created weatcher is 0. =item $w->trigger ($revents) @@ -293,7 +309,8 @@ This periodic timer is based on "wallclock time", that is, if the clock changes (C, C etc.), then the timer will nevertheless run at -the specified time. +the specified time. This means it will never drift (it might jitter, but +it will not drift). The C variant doesn't start (activate) the newly created watcher. @@ -324,6 +341,13 @@ Reconfigures the watcher, see the constructor above for details. Can be at any time. +=item $current_signum = $w->signal + +=item $old_signum = $w->signal ($new_signal) + +Returns the previously set signal (always as a number not name) and +optionally set a new one. + =item $w = EV::child $pid, $callback @@ -347,6 +371,12 @@ Reconfigures the watcher, see the constructor above for details. Can be at any time. +=item $current_pid = $w->pid + +=item $old_pid = $w->pid ($new_pid) + +Returns the previously set process id and optionally set a new one. + =item $w = EV::idle $callback