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

bpo-34430: double chaining futures in asyncio.wrap_future #8804

Closed
wants to merge 1 commit into from
Closed

bpo-34430: double chaining futures in asyncio.wrap_future #8804

wants to merge 1 commit into from

Conversation

alfred-sa
Copy link

@alfred-sa alfred-sa commented Aug 18, 2018

asyncio.future.wrap_future is used to wrap a concurrent.future.Future in a asyncio.future.Future.

The actual implementation as the following behaviours :

  1. When the concurrent.future.Future gets a result, the asyncio.future.Future gets the same result,
  2. When the asyncio.future.Future is cancelled, the concurrent.future.Future is cancelled

I wonder why the futures synchronisation is not symmetrical ?
I propose to add the following behaviours :

  1. When the asyncio.future.Future gets a result, the concurrent.future.Future gets the same result,
  2. When the concurrent.future.Future is cancelled, the asyncio.future.Future is cancelled

If there is good reasons to not implement the proposed behaviours, I would be glad to know.

Thank you !

https://bugs.python.org/issue34430

@the-knights-who-say-ni
Copy link

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA).

Unfortunately our records indicate you have not signed the CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

You can check yourself to see if the CLA has been received.

Thanks again for your contribution, we look forward to reviewing it!

@alfred-sa alfred-sa changed the title bpo-?: double chaining futures in asyncio.wrap_future bpo-34430: double chaining futures in asyncio.wrap_future Aug 18, 2018
@alfred-sa alfred-sa closed this Aug 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants