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

Comparing Coro/Coro.pm (file contents):
Revision 1.121 by root, Fri Apr 13 12:56:55 2007 UTC vs.
Revision 1.122 by root, Sat Apr 14 15:06:05 2007 UTC

185 185
186Create a new asynchronous coroutine and return it's coroutine object 186Create a new asynchronous coroutine and return it's coroutine object
187(usually unused). When the sub returns the new coroutine is automatically 187(usually unused). When the sub returns the new coroutine is automatically
188terminated. 188terminated.
189 189
190Calling C<exit> in a coroutine will try to do the same as calling exit 190Calling C<exit> in a coroutine will do the same as calling exit outside
191outside the coroutine, but this is experimental. It is best not to rely on 191the coroutine. Likewise, when the coroutine dies, the program will exit,
192exit doing any cleanups or even not crashing. 192just as it would in the main program.
193
194When the coroutine dies, the program will exit, just as in the main
195program.
196 193
197 # create a new coroutine that just prints its arguments 194 # create a new coroutine that just prints its arguments
198 async { 195 async {
199 print "@_\n"; 196 print "@_\n";
200 } 1,2,3,4; 197 } 1,2,3,4;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines