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

gh-76425: Cancel Listener.accept() after Listener is closed #96626

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zariiii9003
Copy link

@zariiii9003 zariiii9003 commented Sep 6, 2022

Currently Listener.accept() blocks indefinitely in the WaitForMultipleObjects call.
The PR adds an event which is signalled when the Listener is closed.

@cpython-cla-bot
Copy link

cpython-cla-bot bot commented Sep 6, 2022

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-bot
Copy link

bedevere-bot commented Sep 6, 2022

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

@zariiii9003
Copy link
Author

zariiii9003 commented Sep 7, 2022

I see some dying threads in the test suite:

Exception in thread Thread-1 (accepter):
Traceback (most recent call last):
File "D:\a\cpython\cpython\Lib\multiprocessing\connection.py", line 688, in accept
raise OSError("Listener was closed.")
OSError: Listener was closed.

But i can't tell which tests they belong to. How were these threads handled without this PR? Overall the test suite succeeded which is weird.

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