Skip to content

[3.11] gh-113205: test_multiprocessing.test_terminate: Test the API on threadpools (GH-114186) - #114223

Merged
encukou merged 1 commit into
python:3.11from
miss-islington:backport-c1db960-3.11
Jan 18, 2024
Merged

[3.11] gh-113205: test_multiprocessing.test_terminate: Test the API on threadpools (GH-114186)#114223
encukou merged 1 commit into
python:3.11from
miss-islington:backport-c1db960-3.11

Conversation

@miss-islington

Copy link
Copy Markdown
Contributor

gh-113205: test_multiprocessing.test_terminate: Test the API works on threadpools

Threads can't be forced to terminate (without potentially corrupting too much
state), so the expected behaviour of ThreadPool.terminate is to wait for
the currently executing tasks to finish.

The entire test was skipped in GH-110848 (0e9c364).
Instead of skipping it entirely, we should ensure the API eventually succeeds:
use a shorter timeout.

For the record: on my machine, when the test is un-skipped, the task manages to
start in about 1.5% cases.
(cherry picked from commit c1db960)

Co-authored-by: Petr Viktorin encukou@gmail.com

… threadpools (pythonGH-114186)
pythongh-113205: test_multiprocessing.test_terminate: Test the API works on threadpools
Threads can't be forced to terminate (without potentially corrupting too much
state), so the expected behaviour of `ThreadPool.terminate` is to wait for
the currently executing tasks to finish.
The entire test was skipped in pythonGH-110848 (0e9c364).
Instead of skipping it entirely, we should ensure the API eventually succeeds:
use a shorter timeout.
For the record: on my machine, when the test is un-skipped, the task manages to
start in about 1.5% cases.
(cherry picked from commit c1db960)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
@bedevere-bot

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @gpshead for commit db5921b 🤖

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

@bedevere-botbedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jan 18, 2024
@gpsheadgpshead self-assigned this Jan 18, 2024
@gpshead

Copy link
Copy Markdown
Member

holding off merging while a possible additional test fix is looked into on main. see the issue.

@encukou

Copy link
Copy Markdown
Member

Not all buildbots passed, but all the failures are unrelated.

@encukou
encukou merged commit 569182c into python:3.11Jan 18, 2024
@miss-islington
miss-islington deleted the backport-c1db960-3.11 branch January 2, 2026 18:40
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@miss-islington@bedevere-bot@gpshead@encukou