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

Comparing EV/EV/AnyEvent.pm (file contents):
Revision 1.5 by root, Mon Oct 29 07:57:16 2007 UTC vs.
Revision 1.6 by root, Wed Oct 31 14:44:35 2007 UTC

34 34
35 my $cb = $arg{cb}; 35 my $cb = $arg{cb};
36 36
37 EV::io 37 EV::io
38 fileno $arg{fh}, 38 fileno $arg{fh},
39 ($arg{poll} =~ /r/ ? EV::READ : 0) | ($arg{poll} =~ /w/ ? EV::WRITE : 0) | EV::PERSIST, 39 ($arg{poll} =~ /r/ ? EV::READ : 0) | ($arg{poll} =~ /w/ ? EV::WRITE : 0),
40 sub { 40 sub {
41 $cb->( ($_[1] & EV::READ ? "r" : "") . ($_[1] & EV::WRITE ? "w" : "") ); 41 $cb->( ($_[1] & EV::READ ? "r" : "") . ($_[1] & EV::WRITE ? "w" : "") );
42 } 42 }
43} 43}
44 44
55sub broadcast { 55sub broadcast {
56 ${$_[0]}++; 56 ${$_[0]}++;
57} 57}
58 58
59sub wait { 59sub wait {
60 EV::loop EV::LOOP_ONCE 60 EV::loop EV::LOOP_ONESHOT
61 while !${$_[0]}; 61 while !${$_[0]};
62} 62}
63 63
64sub one_event { 64sub one_event {
65 EV::loop EV::LOOP_ONCE; 65 EV::loop EV::LOOP_ONESHOT;
66} 66}
67 67
681; 681;
69 69
70=head1 SEE ALSO 70=head1 SEE ALSO

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines