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

Detect active Loop #113

Closed
joelwurtz opened this issue Nov 15, 2016 · 4 comments
Closed

Detect active Loop #113

joelwurtz opened this issue Nov 15, 2016 · 4 comments
Labels
Milestone

Comments

@joelwurtz
Copy link
Contributor

See async-interop/promise#17 which introduces the notion of active loop :

If there is no active loop, and one of the callbacks....

How do we check if there is or isn't an active loop ? I'm wondering if this should be specificied in this standard or we should do the following:

    function hasLoop()
    {
        try {
            Loop::get();

            return true;
        } catch (\LogicException $exception) {
            return false;
        }
    }
@kelunik
Copy link
Member

kelunik commented Nov 15, 2016

We don't. This will be removed soon.

@bwoebi
Copy link
Member

bwoebi commented Nov 15, 2016

Depending on knowledge whether the loop is active is a bad idea, this was a bad decision in my PR and it rightfully got not merged in the promise repo.

@kelunik
Copy link
Member

kelunik commented Dec 5, 2016

@joelwurtz Can I close this issue? You won't have to know whether a loop is active.

@joelwurtz
Copy link
Contributor Author

Fine for me yes, thanks !

@kelunik kelunik modified the milestone: 1.0.0 Dec 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants