Skip to content

Set multiprocessing start method early#2776

Merged
ahopkins merged 12 commits into
mainfrom
set-start-method-early
Jul 9, 2023
Merged

Set multiprocessing start method early#2776
ahopkins merged 12 commits into
mainfrom
set-start-method-early

Conversation

@ahopkins

@ahopkins ahopkins commented Jul 9, 2023

Copy link
Copy Markdown
Member

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

codecov Bot commented Jul 9, 2023

Copy link
Copy Markdown

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

2 participants