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

Comparing Coro/Coro.pm (file contents):
Revision 1.32 by root, Sun Sep 2 01:03:53 2001 UTC vs.
Revision 1.35 by root, Mon Sep 24 00:16:30 2001 UTC

36 36
37use Coro::State; 37use Coro::State;
38 38
39use base Exporter; 39use base Exporter;
40 40
41$VERSION = 0.49; 41$VERSION = 0.5;
42 42
43@EXPORT = qw(async cede schedule terminate current); 43@EXPORT = qw(async cede schedule terminate current);
44%EXPORT_TAGS = ( 44%EXPORT_TAGS = (
45 prio => [qw(PRIO_MAX PRIO_HIGH PRIO_NORMAL PRIO_LOW PRIO_IDLE PRIO_MIN)], 45 prio => [qw(PRIO_MAX PRIO_HIGH PRIO_NORMAL PRIO_LOW PRIO_IDLE PRIO_MIN)],
46); 46);
229=cut 229=cut
230 230
231sub cancel { 231sub cancel {
232 push @destroy, $_[0]; 232 push @destroy, $_[0];
233 $manager->ready; 233 $manager->ready;
234 &schedule if $current == $_[0];
234} 235}
235 236
236=item $oldprio = $process->prio($newprio) 237=item $oldprio = $process->prio($newprio)
237 238
238Sets the priority of the process. Higher priority processes get run before 239Sets the priority of the process. Higher priority processes get run before
279 280
2801; 2811;
281 282
282=head1 BUGS/LIMITATIONS 283=head1 BUGS/LIMITATIONS
283 284
284 - could be faster, especially when the core would introduce special 285 - you must make very sure that no coro is still active on global destruction.
285 support for coroutines (like it does for threads). 286 very bad things might happen otherwise (usually segfaults).
286 - there is still a memleak on coroutine termination that I could not
287 identify. Could be as small as a single SV.
288 - this module is not well-tested.
289 - if variables or arguments "disappear" (become undef) or become
290 corrupted please contact the author so he cen iron out the
291 remaining bugs.
292 - this module is not thread-safe. You must only ever use this module from 287 - this module is not thread-safe. You must only ever use this module from
293 the same thread (this requirement might be loosened in the future to 288 the same thread (this requirement might be loosened in the future to
294 allow per-thread schedulers, but Coro::State does not yet allow this). 289 allow per-thread schedulers, but Coro::State does not yet allow this).
295 290
296=head1 SEE ALSO 291=head1 SEE ALSO

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines