… | |
… | |
219 | issued in case of an exception instead of terminating the program, as |
219 | issued in case of an exception instead of terminating the program, as |
220 | C<async> does. As the coroutine is being reused, stuff like C<on_destroy> |
220 | C<async> does. As the coroutine is being reused, stuff like C<on_destroy> |
221 | will not work in the expected way, unless you call terminate or cancel, |
221 | will not work in the expected way, unless you call terminate or cancel, |
222 | which somehow defeats the purpose of pooling. |
222 | which somehow defeats the purpose of pooling. |
223 | |
223 | |
224 | The priority will be reset to C<0> after each job, otherwise the coroutine |
224 | The priority will be reset to C<0> after each job, tracing will be |
225 | will be re-used "as-is". |
225 | disabled, the description will be reset and the default output filehandle |
|
|
226 | gets restored, so you can change alkl these. Otherwise the coroutine will |
|
|
227 | be re-used "as-is": most notably if you change other per-coroutine global |
|
|
228 | stuff such as C<$/> you need to revert that change, which is most simply |
|
|
229 | done by using local as in C< local $/ >. |
226 | |
230 | |
227 | The pool size is limited to 8 idle coroutines (this can be adjusted by |
231 | The pool size is limited to 8 idle coroutines (this can be adjusted by |
228 | changing $Coro::POOL_SIZE), and there can be as many non-idle coros as |
232 | changing $Coro::POOL_SIZE), and there can be as many non-idle coros as |
229 | required. |
233 | required. |
230 | |
234 | |