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

run fetches in parallel #34

Closed
oconnor663 opened this issue Aug 11, 2014 · 3 comments
Closed

run fetches in parallel #34

oconnor663 opened this issue Aug 11, 2014 · 3 comments

Comments

@oconnor663
Copy link
Member

We'll use asyncio for this, from the 3.3-compatible "tulip" library. Some things to remember:

  • Make sure modules and rules lock their get_tree methods. We don't want to allow multiple fetches to happen at once for the same module.
  • Use a semaphore to limit the number of parallel jobs.
  • Refactor resolver.py so that not everything needs to become a coroutine.
@oconnor663
Copy link
Member Author

Tests passing: https://phabricator.buildinspace.com/D58

@oconnor663
Copy link
Member Author

--parallel flag to control parallelism: https://phabricator.buildinspace.com/D59

@oconnor663
Copy link
Member Author

Stackoverflow question to help with testing this: http://stackoverflow.com/questions/25389895/how-can-i-tell-when-the-event-loop-is-idle

Edit: Really poorly presented question. I deleted it. But the closest thing to what I was looking for is BaseEventLoop._run_once(). It's an implementation detail, but maybe it wouldn't be the end of the world to depend on it in a test.

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

No branches or pull requests

1 participant