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

Comparing cvsroot/Coro/Coro.pm (file contents):
Revision 1.311 by root, Fri Nov 30 08:12:37 2012 UTC vs.
Revision 1.313 by root, Fri Dec 7 22:37:24 2012 UTC

342 342
343our $idle; # idle handler 343our $idle; # idle handler
344our $main; # main coro 344our $main; # main coro
345our $current; # current coro 345our $current; # current coro
346 346
347our $VERSION = "6.10"; 347our $VERSION = 6.23;
348 348
349our @EXPORT = qw(async async_pool cede schedule terminate current unblock_sub rouse_cb rouse_wait); 349our @EXPORT = qw(async async_pool cede schedule terminate current unblock_sub rouse_cb rouse_wait);
350our %EXPORT_TAGS = ( 350our %EXPORT_TAGS = (
351 prio => [qw(PRIO_MAX PRIO_HIGH PRIO_NORMAL PRIO_LOW PRIO_IDLE PRIO_MIN)], 351 prio => [qw(PRIO_MAX PRIO_HIGH PRIO_NORMAL PRIO_LOW PRIO_IDLE PRIO_MIN)],
352); 352);
357=over 4 357=over 4
358 358
359=item $Coro::main 359=item $Coro::main
360 360
361This variable stores the Coro object that represents the main 361This variable stores the Coro object that represents the main
362program. While you cna C<ready> it and do most other things you can do to 362program. While you can C<ready> it and do most other things you can do to
363coro, it is mainly useful to compare again C<$Coro::current>, to see 363coro, it is mainly useful to compare again C<$Coro::current>, to see
364whether you are running in the main program or not. 364whether you are running in the main program or not.
365 365
366=cut 366=cut
367 367
927coro thread. This is just a free-form string you can associate with a 927coro thread. This is just a free-form string you can associate with a
928coro. 928coro.
929 929
930This method simply sets the C<< $coro->{desc} >> member to the given 930This method simply sets the C<< $coro->{desc} >> member to the given
931string. You can modify this member directly if you wish, and in fact, this 931string. You can modify this member directly if you wish, and in fact, this
932is often preferred to indicate major processing states that cna then be 932is often preferred to indicate major processing states that can then be
933seen for example in a L<Coro::Debug> session: 933seen for example in a L<Coro::Debug> session:
934 934
935 sub my_long_function { 935 sub my_long_function {
936 local $Coro::current->{desc} = "now in my_long_function"; 936 local $Coro::current->{desc} = "now in my_long_function";
937 ... 937 ...

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines