ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/README
(Generate patch)

Comparing AnyEvent/README (file contents):
Revision 1.75 by root, Thu Jul 16 12:48:38 2015 UTC vs.
Revision 1.77 by root, Sat Sep 17 02:33:54 2016 UTC

812 $bool = $cv->ready 812 $bool = $cv->ready
813 Returns true when the condition is "true", i.e. whether "send" or 813 Returns true when the condition is "true", i.e. whether "send" or
814 "croak" have been called. 814 "croak" have been called.
815 815
816 $cb = $cv->cb ($cb->($cv)) 816 $cb = $cv->cb ($cb->($cv))
817 This is a mutator function that returns the callback set and 817 This is a mutator function that returns the callback set (or "undef"
818 optionally replaces it before doing so. 818 if not) and optionally replaces it before doing so.
819 819
820 The callback will be called when the condition becomes "true", i.e. 820 The callback will be called when the condition becomes "true", i.e.
821 when "send" or "croak" are called, with the only argument being the 821 when "send" or "croak" are called, with the only argument being the
822 condition variable itself. If the condition is already true, the 822 condition variable itself. If the condition is already true, the
823 callback is called immediately when it is set. Calling "recv" inside 823 callback is called immediately when it is set. Calling "recv" inside
824 the callback or at any later time is guaranteed not to block. 824 the callback or at any later time is guaranteed not to block.
825
826 Additionally, when the callback is invoked, it is also removed from
827 the condvar (reset to "undef"), so the condvar does not keep a
828 reference to the callback after invocation.
825 829
826SUPPORTED EVENT LOOPS/BACKENDS 830SUPPORTED EVENT LOOPS/BACKENDS
827 The available backend classes are (every class has its own manpage): 831 The available backend classes are (every class has its own manpage):
828 832
829 Backends that are autoprobed when no other event loop can be found. 833 Backends that are autoprobed when no other event loop can be found.
1608 my $txn = shift; 1612 my $txn = shift;
1609 my $data = $txn->result; 1613 my $data = $txn->result;
1610 ... 1614 ...
1611 }); 1615 });
1612 1616
1613 EV::loop; 1617 EV::run;
1614 1618
1615 3b. The module user could use AnyEvent, too: 1619 3b. The module user could use AnyEvent, too:
1616 1620
1617 use AnyEvent; 1621 use AnyEvent;
1618 1622

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines