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

Set multiprocessing start method early #2776

Merged
merged 12 commits into from Jul 9, 2023
Merged

Conversation

ahopkins
Copy link
Member

@ahopkins ahopkins commented Jul 9, 2023

This PR sets the context as early as possible. Since get_context("spawn") is not the same as set_start_method("spawn") and get_context(), we are adopting the second pattern. This should allow for less "gotchas" when using multiprocessing primitives like multiprocessing.Queue.

@ahopkins ahopkins requested a review from a team as a code owner July 9, 2023 12:44
@codecov
Copy link

codecov bot commented Jul 9, 2023

Codecov Report

Patch coverage: 78.947% and project coverage change: +0.020 🎉

Comparison is base (4a2b82e) 88.923% compared to head (7e81544) 88.944%.

Additional details and impacted files
@@              Coverage Diff              @@
##              main     #2776       +/-   ##
=============================================
+ Coverage   88.923%   88.944%   +0.020%     
=============================================
  Files           92        92               
  Lines         6988      7001       +13     
  Branches      1192      1194        +2     
=============================================
+ Hits          6214      6227       +13     
  Misses         529       529               
  Partials       245       245               
Impacted Files Coverage Δ
sanic/mixins/startup.py 92.037% <76.470%> (-0.717%) ⬇️
sanic/app.py 90.169% <100.000%> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

prryplatypus
prryplatypus previously approved these changes Jul 9, 2023
@ahopkins ahopkins merged commit 666371b into main Jul 9, 2023
27 checks passed
@ahopkins ahopkins deleted the set-start-method-early branch July 9, 2023 19:34
@ahopkins ahopkins mentioned this pull request Jul 13, 2023
1 task
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.

None yet

2 participants