> On Mar 10, 2021, at 2:15 AM, 韩天峰 <rango@swoole.com> wrote:
>
> Hi ereryone, My name is Tianfeng.Han, I am founder of swoole project. We have done a lot of
> exploration in cli server side programming of php
>
> I think, ext-fiber is more suitable as a pecl project.
>
> Coroutine and asynchronous IO is a new concurrency model, This is very different from blocking
> io.
>
> I am afraid that fiber can only be used in the amphp framework and is of no value to other php
> projects.
>
> If the PHP language wants to support CSP programming like golang, asynchronous io and coroutine
> system can be designed in the next major version (PHP9), this requires a lot of work.
>
>
> Tianfeng.Han
>
Hi Tianfeng.Han,
Fibers will immediately benefit projects that use async I/O. This is not limited to amphp, but also
includes ReactPHP, Guzzle, Symfony, and Psalm, to name that I am aware of that could use it in
conjunction with I/O and multi-processing.
One of the ReactPHP maintainers and I collaborated on a proof-of-concept for ReactPHP, which is
mentioned in the RFC: https://github.com/trowski/react-fiber
This fiber API was meant to be a lightweight implementation to enable user space
green-threads/coroutines. I would love to see more async tools in PHP, but that will require much
more work. This is meant to be a first step toward that eventual goal, without conflicting with or
restricting future additions.
Cheers,
Aaron Piotrowski