> On 9 Sep 2017, at 14:27, Haitao Lv <i...@lvht.net> wrote:
> 
>> I note that the examples there all implement it not as a keyword, but as a 
>> library function, which maybe makes more sense: whereas "yield" turns a 
>> function declaration into a generator declaration, "Fiber\yield", as we 
>> might call it, is just a function call which can happen anywhere and 
>> manipulates some global state.
> 
> As the Zend Engine does not offer API to pause execution, I cannot implement 
> the await without
> introducing a new keyword (just like yield).
> 
>> The choice of "await" also feels odd: you're not awaiting the thing on the 
>> right-hand side of the keyword, you're sending it somewhere and awaiting 
>> something else.
> 
> await is chosen because we cannot reuse the `yield` keyword. Maybe we can 
> choose a more proper keyword.

Sorry for misunderstanding. The keyword await has been dropped and Fiber::yield 
implemented.
Please see https://github.com/php/php-src/pull/2733


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

Reply via email to