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

Requests not being made in same order as list #12

Closed
ZechyW opened this issue Jun 19, 2012 · 3 comments
Closed

Requests not being made in same order as list #12

ZechyW opened this issue Jun 19, 2012 · 3 comments

Comments

@ZechyW
Copy link

ZechyW commented Jun 19, 2012

Although a list of Requests is passed to the map function, the actual HTTP requests are made in arbitrary order.

This is not unexpected, of course, but it would still be nice to have the list's order followed, somehow.

Running gevent.sleep(0) after each spawn (i.e. in the send function) seems to maintain order with no apparent side effects; perhaps you might like to consider adding it?

@kennethreitz
Copy link
Collaborator

This is why the request object is attached to the response ;)

@ZechyW
Copy link
Author

ZechyW commented Jun 19, 2012

Ah yes, but I was referring to the order in which actual requests to the server are made.
Specifically, I'm trying to pull a bunch of files off a server; with grequests, the actual GETs go through in random order, whereas with e.g. a browser they get retrieved in a fixed order.
It's not a big deal really, but the discrepancy just keeps catching my eye ;)

@kennethreitz
Copy link
Collaborator

Ah I agree. It would be great to have a generator interface for this.

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

2 participants