… | |
… | |
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 | |
… | |
… | |
593 | to allow per-thread schedulers, but Coro::State does not yet allow |
597 | to allow per-thread schedulers, but Coro::State does not yet allow |
594 | this). |
598 | this). |
595 | |
599 | |
596 | =head1 SEE ALSO |
600 | =head1 SEE ALSO |
597 | |
601 | |
598 | Support/Utility: L<Coro::Cont>, L<Coro::Specific>, L<Coro::State>, L<Coro::Util>. |
602 | Support/Utility: L<Coro::Specific>, L<Coro::State>, L<Coro::Util>. |
599 | |
603 | |
600 | Locking/IPC: L<Coro::Signal>, L<Coro::Channel>, L<Coro::Semaphore>, L<Coro::SemaphoreSet>, L<Coro::RWLock>. |
604 | Locking/IPC: L<Coro::Signal>, L<Coro::Channel>, L<Coro::Semaphore>, L<Coro::SemaphoreSet>, L<Coro::RWLock>. |
601 | |
605 | |
602 | Event/IO: L<Coro::Timer>, L<Coro::Event>, L<Coro::Handle>, L<Coro::Socket>, L<Coro::Select>. |
606 | Event/IO: L<Coro::Timer>, L<Coro::Event>, L<Coro::Handle>, L<Coro::Socket>, L<Coro::Select>. |
603 | |
607 | |