… | |
… | |
188 | |
188 | |
189 | my $hello_world = $coro->join; |
189 | my $hello_world = $coro->join; |
190 | |
190 | |
191 | print $hello_world; |
191 | print $hello_world; |
192 | |
192 | |
193 | Another way to terminate is to call C<< Coro::terminate >>, which at any |
193 | Another way to terminate is to call C<< Coro::terminate >>, which works at |
194 | subroutine call nesting level: |
194 | any subroutine call nesting level: |
195 | |
195 | |
196 | async { |
196 | async { |
197 | Coro::terminate "return value 1", "return value 2"; |
197 | Coro::terminate "return value 1", "return value 2"; |
198 | }; |
198 | }; |
199 | |
199 | |