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

start using any io for structured concurency #1065

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

07pepa
Copy link
Member

@07pepa 07pepa commented Nov 7, 2024

Rationale

gather does not cancel other running tasks.

using structured concurency (aka TaskGroup) will cancel running if any of corutines in same group fails.
This avoid unnecesary and unexpected memory leak performance because we will be running "zombie" tasks we no longer need throwing out results.

blurb from python documentation
image
this is awailible in python 3.12 and equivalent in trio

Copy link

@Riverfount Riverfount left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@07pepa 07pepa changed the title start using any io for better readability start using any io for structured concurency Nov 21, 2024
@07pepa
Copy link
Member Author

07pepa commented Nov 21, 2024

@CAPITAINMARVEL @adeelsohailahmed please review

@07pepa 07pepa enabled auto-merge (rebase) November 21, 2024 09:21
Copy link
Contributor

@CAPITAINMARVEL CAPITAINMARVEL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

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

Successfully merging this pull request may close these issues.

3 participants