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

Comparing AnyEvent/lib/AnyEvent.pm (file contents):
Revision 1.427 by root, Wed Jan 27 18:15:21 2016 UTC vs.
Revision 1.428 by root, Thu Sep 15 01:14:42 2016 UTC

845Returns true when the condition is "true", i.e. whether C<send> or 845Returns true when the condition is "true", i.e. whether C<send> or
846C<croak> have been called. 846C<croak> have been called.
847 847
848=item $cb = $cv->cb ($cb->($cv)) 848=item $cb = $cv->cb ($cb->($cv))
849 849
850This is a mutator function that returns the callback set and optionally 850This is a mutator function that returns the callback set (or C<undef> if
851replaces it before doing so. 851not) and optionally replaces it before doing so.
852 852
853The callback will be called when the condition becomes "true", i.e. when 853The callback will be called when the condition becomes "true", i.e. when
854C<send> or C<croak> are called, with the only argument being the 854C<send> or C<croak> are called, with the only argument being the
855condition variable itself. If the condition is already true, the 855condition variable itself. If the condition is already true, the
856callback is called immediately when it is set. Calling C<recv> inside 856callback is called immediately when it is set. Calling C<recv> inside
857the callback or at any later time is guaranteed not to block. 857the callback or at any later time is guaranteed not to block.
858
859Additionally, when the callback is invoked, it is also removed from the
860condvar (reset to C<undef>), so the condvar does not keep a reference to
861the callback after invocation.
858 862
859=back 863=back
860 864
861=head1 SUPPORTED EVENT LOOPS/BACKENDS 865=head1 SUPPORTED EVENT LOOPS/BACKENDS
862 866

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines