[RFC] Fibers

From: Date: Thu, 17 Dec 2020 16:30:29 +0000
Subject: [RFC] Fibers
Groups: php.internals 
Request: Send a blank email to internals+get-112538@lists.php.net to get a copy of this message
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

« previous php.internals (#112538) next »