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

Comparing Coro/Coro.pm (file contents):
Revision 1.73 by root, Mon Dec 12 20:31:23 2005 UTC vs.
Revision 1.80 by root, Mon Nov 6 19:56:26 2006 UTC

41 41
42our $idle; # idle coroutine 42our $idle; # idle coroutine
43our $main; # main coroutine 43our $main; # main coroutine
44our $current; # current coroutine 44our $current; # current coroutine
45 45
46our $VERSION = 1.6; 46our $VERSION = '2.5';
47 47
48our @EXPORT = qw(async cede schedule terminate current); 48our @EXPORT = qw(async cede schedule terminate current);
49our %EXPORT_TAGS = ( 49our %EXPORT_TAGS = (
50 prio => [qw(PRIO_MAX PRIO_HIGH PRIO_NORMAL PRIO_LOW PRIO_IDLE PRIO_MIN)], 50 prio => [qw(PRIO_MAX PRIO_HIGH PRIO_NORMAL PRIO_LOW PRIO_IDLE PRIO_MIN)],
51); 51);
163 163
164Create a new asynchronous process and return it's process object 164Create a new asynchronous process and return it's process object
165(usually unused). When the sub returns the new process is automatically 165(usually unused). When the sub returns the new process is automatically
166terminated. 166terminated.
167 167
168When the coroutine dies, the program will exit, just as in the main
169program.
170
168 # create a new coroutine that just prints its arguments 171 # create a new coroutine that just prints its arguments
169 async { 172 async {
170 print "@_\n"; 173 print "@_\n";
171 } 1,2,3,4; 174 } 1,2,3,4;
172 175
241 244
242=cut 245=cut
243 246
244=item $process->cancel (arg...) 247=item $process->cancel (arg...)
245 248
246Temrinates the given process and makes it return the given arguments as 249Terminates the given process and makes it return the given arguments as
247status (default: the empty list). 250status (default: the empty list).
248 251
249=cut 252=cut
250 253
251sub cancel { 254sub cancel {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines