Skip to content

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

Merged
bdraco merged 2 commits into
masterfrom
strong_ref
Feb 18, 2025
Merged

fix: hold a strong reference to the AsyncEngine setup task#1533
bdraco merged 2 commits into
masterfrom
strong_ref

Conversation

@bdraco

@bdraco bdraco commented Feb 18, 2025

Copy link
Copy Markdown
Member

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:

@codspeed-hq

codspeed-hq Bot commented Feb 18, 2025

Copy link
Copy Markdown

CodSpeed Performance Report

Merging #1533 will not alter performance

Comparing strong_ref (a0d26af) with master (777c379)

Summary

✅ 6 untouched benchmarks

@codecov

codecov Bot commented Feb 18, 2025

Copy link
Copy Markdown

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
@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