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

Comparing Coro/Coro.pm (file contents):
Revision 1.16 by root, Tue Jul 17 15:42:28 2001 UTC vs.
Revision 1.17 by root, Thu Jul 19 02:45:09 2001 UTC

31 31
32use Coro::State; 32use Coro::State;
33 33
34use base Exporter; 34use base Exporter;
35 35
36$VERSION = 0.07; 36$VERSION = 0.08;
37 37
38@EXPORT = qw(async yield schedule terminate); 38@EXPORT = qw(async yield schedule terminate);
39@EXPORT_OK = qw($current); 39@EXPORT_OK = qw($current);
40 40
41{ 41{
52 my @attrs; 52 my @attrs;
53 for (@_) { 53 for (@_) {
54 if ($_ eq "Coro") { 54 if ($_ eq "Coro") {
55 push @async, $ref; 55 push @async, $ref;
56 } else { 56 } else {
57 push @attrs, @_; 57 push @attrs, $_;
58 } 58 }
59 } 59 }
60 return $old ? $old->($package, $name, @attrs) : @attrs; 60 return $old ? $old->($package, $ref, @attrs) : @attrs;
61 }; 61 };
62 } 62 }
63 63
64 sub INIT { 64 sub INIT {
65 async pop @async while @async; 65 async pop @async while @async;
220 220
221=cut 221=cut
222 222
2231; 2231;
224 224
225=head1 BUGS 225=head1 BUGS/LIMITATIONS
226 226
227 - could be faster, especially when the core would introduce special 227 - could be faster, especially when the core would introduce special
228 support for coroutines (like it does for threads). 228 support for coroutines (like it does for threads).
229 - there is still a memleak on coroutine termination that I could not 229 - there is still a memleak on coroutine termination that I could not
230 identify. Could be as small as a single SV. 230 identify. Could be as small as a single SV.
231 - this module is not well-tested. 231 - this module is not well-tested.
232 - if variables or arguments "disappear" (become undef) or become
233 corrupted please contact the author so he cen iron out the
234 remaining bugs.
235 - this module is not thread-safe. You must only ever use this module from
236 the same thread (this requirement might be loosened in the future to
237 allow per-thread schedulers, but Coro::Satte does not yet allow this).
232 238
233=head1 SEE ALSO 239=head1 SEE ALSO
234 240
235L<Coro::Channel>, L<Coro::Cont>, L<Coro::Specific>, L<Coro::Semaphore>, 241L<Coro::Channel>, L<Coro::Cont>, L<Coro::Specific>, L<Coro::Semaphore>,
236L<Coro::Signal>, L<Coro::State>, L<Coro::Event>. 242L<Coro::Signal>, L<Coro::State>, L<Coro::Event>.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines