Hello everyone!

I would like to introduce an RFC for adding full-stack fibers to PHP: 
https://wiki.php.net/rfc/fibers

Fibers are primarily used to implement green-threads or coroutines for 
asynchronous I/O. Fibers are similar to threads, except fibers exist within a 
single thread and require cooperative scheduling of the fibers by the process. 
Since fibers do not require a full CPU context switch, they are lightweight and 
more performant than multi-processing or threading for awaiting I/O.

An implementation as an extension is at https://github.com/amphp/ext-fiber

Fibers are a complex feature. The RFC contains many examples and links to code 
using fibers to help explain and demonstrate what is possible, however I’m 
certain many more questions and concerns will arise. Looking forward to 
feedback and discussion.

Aaron Piotrowski
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to