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

Correct and consistent passing of provided event loop #4

Open
saaj opened this issue Jun 8, 2015 · 0 comments
Open

Correct and consistent passing of provided event loop #4

saaj opened this issue Jun 8, 2015 · 0 comments

Comments

@saaj
Copy link
Contributor

saaj commented Jun 8, 2015

AbstractActor's initialiser accepts external loop but it doesn't use the parameter correctly.

self._loop = kwargs.get('loop', asyncio.get_event_loop())

Here default event loop is retrieved even if user provided loop keyword argument. It leads to exception when default event loop is not initialised.

self._loop is not passed to Future at self._run_complete. Also QueryMessage need not to instantiate a Future on its own. Actor class is better to create the Future and pass its self._loop into it.

As a use case, here's recommendation for testing asyncio code from one of the library's authors.

biesnecker added a commit that referenced this issue Dec 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant