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
Uses of SocketServer.BaseServer.shutdown have a race #46555
Comments
With the code as it stands, calls to shutdown that happen before A third choice would be to add a .serve_in_thread function that returns |
Never thought of using the SocketServer taht way, wouldn't the person
I don't think I understand this part, what loop do you refer to ? |
After a bit of investigation, this issue seems to be exactly why test_httpservers sometimes hangs. |
Here is a simpler patch. It also fixes the wrong use of a lock instead of an event in test_httpservers. With this patch, test_httpservers runs forever without freezing. |
By the way, getting rid of poll_interval for a file descriptor is easy under Unix, but wouldn't work under Windows (where select() only takes sockets, not arbitrary file descriptors). |
Fixed with a test in r80484 (trunk), r80486 (2.6), r80487 (py3k), r80491 (3.1). |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: