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

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

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

miss-islington
Copy link
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>
@gpshead
Copy link
Member

gpshead commented Jan 18, 2024

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

@encukou encukou merged commit c2a2126 into python:3.12 Jan 18, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants