… | |
… | |
275 | } |
275 | } |
276 | } |
276 | } |
277 | } |
277 | } |
278 | |
278 | |
279 | sub async_pool(&@) { |
279 | sub async_pool(&@) { |
280 | # this is also inlined into the unlock_scheduler |
280 | # this is also inlined into the unblock_scheduler |
281 | my $coro = (pop @async_pool) || new Coro \&pool_handler; |
281 | my $coro = (pop @async_pool) || new Coro \&pool_handler; |
282 | |
282 | |
283 | $coro->{_invoke} = [@_]; |
283 | $coro->{_invoke} = [@_]; |
284 | $coro->ready; |
284 | $coro->ready; |
285 | |
285 | |
… | |
… | |
667 | |
667 | |
668 | =head1 BUGS/LIMITATIONS |
668 | =head1 BUGS/LIMITATIONS |
669 | |
669 | |
670 | =over 4 |
670 | =over 4 |
671 | |
671 | |
|
|
672 | =item fork with pthread backend |
|
|
673 | |
|
|
674 | When Coro is compiled using the pthread backend (which isn't recommended |
|
|
675 | but required on many BSDs as their libcs are completely broken), then |
|
|
676 | coroutines will not survive a fork. There is no known workaround except to |
|
|
677 | fix your libc and use a saner backend. |
|
|
678 | |
672 | =item perl process emulation ("threads") |
679 | =item perl process emulation ("threads") |
673 | |
680 | |
674 | This module is not perl-pseudo-thread-safe. You should only ever use this |
681 | This module is not perl-pseudo-thread-safe. You should only ever use this |
675 | module from the same thread (this requirement might be removed in the |
682 | module from the same thread (this requirement might be removed in the |
676 | future to allow per-thread schedulers, but Coro::State does not yet allow |
683 | future to allow per-thread schedulers, but Coro::State does not yet allow |