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

Comparing Coro/Coro.pm (file contents):
Revision 1.282 by root, Sun Dec 26 16:23:51 2010 UTC vs.
Revision 1.283 by root, Sat Feb 5 21:20:47 2011 UTC

757 757
758=back 758=back
759 759
760=cut 760=cut
761 761
762for my $module (qw(Channel RWLock Semaphore SemaphoreSet Signal Specific)) {
763 my $old = defined &{"Coro::$module\::new"} && \&{"Coro::$module\::new"};
764
765 *{"Coro::$module\::new"} = sub {
766 require "Coro/$module.pm";
767
768 # some modules have their new predefined in State.xs, some don't
769 *{"Coro::$module\::new"} = $old
770 if $old;
771
772 goto &{"Coro::$module\::new"};
773 };
774}
775
7621; 7761;
763 777
764=head1 HOW TO WAIT FOR A CALLBACK 778=head1 HOW TO WAIT FOR A CALLBACK
765 779
766It is very common for a coro to wait for some callback to be 780It is very common for a coro to wait for some callback to be

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines