Skip to content

fix: hold a strong reference to the AsyncEngine setup task #1533

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

Merged
merged 2 commits into from
Feb 18, 2025
Merged

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Feb 18, 2025

https://docs.python.org/3/library/asyncio-task.html#creating-tasks

Important Save a reference to the result of this function, to avoid a task disappearing mid-execution. The event loop only keeps weak references to tasks. A task that isn’t referenced elsewhere may get garbage collected at any time, even before it’s done. For reliable “fire-and-forget” background tasks, gather them in a collection:

Copy link

codspeed-hq bot commented Feb 18, 2025

CodSpeed Performance Report

Merging #1533 will not alter performance

Comparing strong_ref (a0d26af) with master (777c379)

Summary

✅ 6 untouched benchmarks

Copy link

codecov bot commented Feb 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.79%. Comparing base (777c379) to head (a0d26af).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1533   +/-   ##
=======================================
  Coverage   99.79%   99.79%           
=======================================
  Files          33       33           
  Lines        3388     3392    +4     
  Branches      462      463    +1     
=======================================
+ Hits         3381     3385    +4     
  Misses          5        5           
  Partials        2        2           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bdraco bdraco merged commit d4e6f25 into master Feb 18, 2025
33 checks passed
@bdraco bdraco deleted the strong_ref branch February 18, 2025 04:33
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.

1 participant
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy