… | |
… | |
357 | =over 4 |
357 | =over 4 |
358 | |
358 | |
359 | =item $Coro::main |
359 | =item $Coro::main |
360 | |
360 | |
361 | This variable stores the Coro object that represents the main |
361 | This variable stores the Coro object that represents the main |
362 | program. While you cna C<ready> it and do most other things you can do to |
362 | program. While you can C<ready> it and do most other things you can do to |
363 | coro, it is mainly useful to compare again C<$Coro::current>, to see |
363 | coro, it is mainly useful to compare again C<$Coro::current>, to see |
364 | whether you are running in the main program or not. |
364 | whether you are running in the main program or not. |
365 | |
365 | |
366 | =cut |
366 | =cut |
367 | |
367 | |
… | |
… | |
927 | coro thread. This is just a free-form string you can associate with a |
927 | coro thread. This is just a free-form string you can associate with a |
928 | coro. |
928 | coro. |
929 | |
929 | |
930 | This method simply sets the C<< $coro->{desc} >> member to the given |
930 | This method simply sets the C<< $coro->{desc} >> member to the given |
931 | string. You can modify this member directly if you wish, and in fact, this |
931 | string. You can modify this member directly if you wish, and in fact, this |
932 | is often preferred to indicate major processing states that cna then be |
932 | is often preferred to indicate major processing states that can then be |
933 | seen for example in a L<Coro::Debug> session: |
933 | seen 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 | ... |