… | |
… | |
221 | terminate or join on it (although you are allowed to), and you get a |
221 | terminate or join on it (although you are allowed to), and you get a |
222 | coroutine that might have executed other code already (which can be good |
222 | coroutine that might have executed other code already (which can be good |
223 | or bad :). |
223 | or bad :). |
224 | |
224 | |
225 | On the plus side, this function is faster than creating (and destroying) |
225 | On the plus side, this function is faster than creating (and destroying) |
226 | a completely new coroutine, so if you need a lot of generic coroutines in |
226 | a completly new coroutine, so if you need a lot of generic coroutines in |
227 | quick successsion, use C<async_pool>, not C<async>. |
227 | quick successsion, use C<async_pool>, not C<async>. |
228 | |
228 | |
229 | The code block is executed in an C<eval> context and a warning will be |
229 | The code block is executed in an C<eval> context and a warning will be |
230 | issued in case of an exception instead of terminating the program, as |
230 | issued in case of an exception instead of terminating the program, as |
231 | C<async> does. As the coroutine is being reused, stuff like C<on_destroy> |
231 | C<async> does. As the coroutine is being reused, stuff like C<on_destroy> |