GeezerVison is showing github.com — gh-113205: test_multiprocessing.test_terminate: Test the API on threadpools by encukou · Pull Request #114186 · python/cpython
Conversation
encukou
commented
Jan 17, 2024
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
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 terminate test was skipped in GH-110848 (0e9c364). Instead of skipping it entirely, we should ensure the API eventually succeeds.
For the record: on my machine, when the test is un-skipped on 3.12, the task manages to start in about 1.5% cases.
On older branches, the test is not skipped, so it occasionally takes 5 minutes. The backports will fix issue #113205.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…rks 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Thanks @encukou for the PR, and @gpshead for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Jan 18, 2024
… 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 <[email protected]>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Jan 18, 2024
… 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 <[email protected]>
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
encukou
added a commit
that referenced
this pull request
Jan 18, 2024
…for threadpools (GH-114186) (GH-114222)
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.
Use shorter sleep time for threadpools, so if a task manages to start, the test
doesn't block for long.
(cherry picked from commit c1db960)
Co-authored-by: Petr Viktorin <[email protected]>
encukou
added a commit
that referenced
this pull request
Jan 18, 2024
…for threadpools (GH-114186) (GH-114223)
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.
Use shorter sleep time for threadpools, so if a task manages to start, the test
doesn't block for long.
(cherry picked from commit c1db960)
Co-authored-by: Petr Viktorin <[email protected]>
kulikjak
pushed a commit
to kulikjak/cpython
that referenced
this pull request
Jan 22, 2024
… threadpools (python#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.
aisk
pushed a commit
to aisk/cpython
that referenced
this pull request
Feb 11, 2024
… threadpools (python#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.
Glyphack
pushed a commit
to Glyphack/cpython
that referenced
this pull request
Sep 2, 2024
… threadpools (python#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.
Reviewers
gpshead
gpshead approved these changes
pitrou
pitrou approved these changes
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|