Re: PHP 2^3
| From: | Aaron Piotrowski | Date: | Wed, 27 Jun 2018 16:15:04 +0000 |
| Subject: | Re: PHP 2^3 | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-102497@lists.php.net to get a copy of this message | ||
> On Jun 27, 2018, at 1:48 AM, Dmitry Stogov <dmitry@zend.com> wrote:
>
> Hi Niklas,
>
> Fibers are the major feature we're looking forward to, because it
> allows async I/O in places that do not account for async, e.g. also
> re-using interfaces designed for sync applications. Apart from that,
> we want to avoid the boilerplate we currently have to write, i.e.
> Amp\call wrapping a generator function.
>
> We already have ext/fiber proposal and additioal branch implementing stack-full fibers.
> I think, we'll build fibers in the PHP core reusing this work, keeping the proposed API
> and behavior.
>
I concur with Niklas - Fibers are the major feature needed, the stack-full branch in particular.
Being able to reuse so much existing PHP code is particularly exciting. Most modern, testable PHP
code performing IO should allow for async IO implementations, since IO should be mockable to be
properly tested.
>
> We think that a methodless "Promise" / "Awaitable" type + fibers
> implemented with keywords are the preferred way over the current Fiber
> draft in the long run.
>
> This is too abstract.
> What keywords do you like for fibers and why do we need them?
> Why do we need Promise/Awaitable in the core?
> If you have concrete solution (just API), lets discuss it in separate email thread.
Niklas and/or I will put something together and start a new thread.
Regards,
Aaron Piotrowski