> Hi, all, > > I have updated the RFC https://wiki.php.net/rfc/fiber > > changes list: > > - introduce the `throw(Exception $exceptin)` API > - record issues discussed
What about my suggestion of making PHP's main() automatically a Fiber, which avoids Fiber::yield() being used outside of a Fiber, because everything is a Fiber? This would require another continuation mechanism, as nothing has access to the automatically created main()-Fiber otherwise. There would also need to be something that stops the script execution as soon as there's no non-suspended Fiber anymore. Regarding the internal calls: A core dump / segfault in case of Fiber::yield() inside an internal function is unacceptable. It doesn't give the user any clue what's wrong. Instead, an exception could be thrown from Fiber::yield(), which just bubbles up then. Full support for internal functions could be added at a later point then. Regards, Niklas -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php