Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Why schedule Task instead of just returning Future? #66

Closed
boc0 opened this issue Aug 5, 2019 · 1 comment
Closed

Why schedule Task instead of just returning Future? #66

boc0 opened this issue Aug 5, 2019 · 1 comment

Comments

@boc0
Copy link

boc0 commented Aug 5, 2019

First, thanks for making this.

Trying to await an indexing operation transport.py ensure_future()s the request so it's attached to its own loop. So the task cannot be started in my loop. Why not just return the future without ensure/create_task-ing it?

@sethmlarson
Copy link
Contributor

I believe the original intention was so that cancellation was easier? Not sure. Either way this won't be changing as we won't be implementing any breaking changes. See #81 for more information.

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

No branches or pull requests

2 participants