--- AnyEvent/README 2015/05/02 14:39:31 1.74 +++ AnyEvent/README 2016/09/17 02:33:54 1.77 @@ -814,8 +814,8 @@ "croak" have been called. $cb = $cv->cb ($cb->($cv)) - This is a mutator function that returns the callback set and - optionally replaces it before doing so. + This is a mutator function that returns the callback set (or "undef" + if not) and optionally replaces it before doing so. The callback will be called when the condition becomes "true", i.e. when "send" or "croak" are called, with the only argument being the @@ -823,6 +823,10 @@ callback is called immediately when it is set. Calling "recv" inside the callback or at any later time is guaranteed not to block. + Additionally, when the callback is invoked, it is also removed from + the condvar (reset to "undef"), so the condvar does not keep a + reference to the callback after invocation. + SUPPORTED EVENT LOOPS/BACKENDS The available backend classes are (every class has its own manpage): @@ -1032,6 +1036,10 @@ function, which can reduce typing, codesize and can reduce the logging overhead enourmously. + AnyEvent::fh_block $filehandle + AnyEvent::fh_unblock $filehandle + Sets blocking or non-blocking behaviour for the given filehandle. + WHAT TO DO IN A MODULE As a module author, you should "use AnyEvent" and call AnyEvent methods freely, but you should not load a specific event module or rely on it. @@ -1606,7 +1614,7 @@ ... }); - EV::loop; + EV::run; 3b. The module user could use AnyEvent, too: