Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implicit all combinator for coroutines #68

Closed
kelunik opened this issue Mar 8, 2017 · 1 comment
Closed

Implicit all combinator for coroutines #68

kelunik opened this issue Mar 8, 2017 · 1 comment

Comments

@kelunik
Copy link
Member

kelunik commented Mar 8, 2017

I think it makes sense to support yielding arrays as implicit all combinator, especially with the changes in PHP 7.1 allowing [] for restructuring.

<?php

function coroutine() {
    [$a, $b, $c] = yield [
        asyncOperation1(),
        asyncOperation2(),
        asyncOperation3(),
    ];
};
kelunik pushed a commit that referenced this issue Mar 10, 2017
kelunik pushed a commit that referenced this issue Mar 10, 2017
Conflict due to merge of #68
@bwoebi
Copy link
Member

bwoebi commented Mar 13, 2017

Ad.: Whenever we implement await in PHP, I'd like to see await accepting these arrays too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants