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

Comparing Coro/Coro.pm (file contents):
Revision 1.13 by root, Tue Jul 17 00:24:14 2001 UTC vs.
Revision 1.16 by root, Tue Jul 17 15:42:28 2001 UTC

18 18
19 yield; 19 yield;
20 20
21=head1 DESCRIPTION 21=head1 DESCRIPTION
22 22
23This module collection manages coroutines. Coroutines are similar to
24Threads but don't run in parallel.
25
26This module is still experimental, see the BUGS section below.
27
23=cut 28=cut
24 29
25package Coro; 30package Coro;
26 31
27use Coro::State; 32use Coro::State;
28 33
29use base Exporter; 34use base Exporter;
30 35
31$VERSION = 0.05; 36$VERSION = 0.07;
32 37
33@EXPORT = qw(async yield schedule terminate); 38@EXPORT = qw(async yield schedule terminate);
34@EXPORT_OK = qw($current); 39@EXPORT_OK = qw($current);
35 40
36{ 41{
94 print STDERR "FATAL: deadlock detected\n"; 99 print STDERR "FATAL: deadlock detected\n";
95 exit(51); 100 exit(51);
96}; 101};
97 102
98# we really need priorities... 103# we really need priorities...
99## my @ready; #d#
100our @ready = (); # the ready queue. hehe, rather broken ;) 104my @ready; # the ready queue. hehe, rather broken ;)
101 105
102# static methods. not really. 106# static methods. not really.
103 107
104=head2 STATIC METHODS 108=head2 STATIC METHODS
105 109
216 220
217=cut 221=cut
218 222
2191; 2231;
220 224
225=head1 BUGS
226
227 - could be faster, especially when the core would introduce special
228 support for coroutines (like it does for threads).
229 - there is still a memleak on coroutine termination that I could not
230 identify. Could be as small as a single SV.
231 - this module is not well-tested.
232
221=head1 SEE ALSO 233=head1 SEE ALSO
222 234
223L<Coro::Channel>, L<Coro::Cont>, L<Coro::Specific>, L<Coro::Semaphore>, 235L<Coro::Channel>, L<Coro::Cont>, L<Coro::Specific>, L<Coro::Semaphore>,
224L<Coro::Signal>, L<Coro::State>, L<Coro::Event>. 236L<Coro::Signal>, L<Coro::State>, L<Coro::Event>.
225 237

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines