-
Notifications
You must be signed in to change notification settings - Fork 58
Change back the force shutdown of the executor #173
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
Comments
Hi, did you ever solved this one? I am on Python project with the exact same issue, do you know if an update of Python can fix this? |
The issue doesn't occur for me on Python 3.8.3 or 3.9.5; what is your Python version? |
Thanks! I am running 3.6.9 and I try updating to 3.7.0, I update carefully and step by step because it's a big and old project, so I try to find the minimal path to fix this issue. |
|
Disregard my last message, I misread. The workaround is implemented on Python version above 3.7, however it should not impact 3.6. Are you sure that you are seeing this issue actually? |
I think so, I have the same message and same diagnosis (it worked with 3.6.9 and fails with 3.7.0). I have event that are not processed because of the closed handle. But I haven't digged that much, I remember suffering to produce this code and it was around 4 years ago haha. I'll try just updating to > 3.7.0 anyway |
For the record, I seem to reproduce in Python 3.8, however I am not using an executor, code looks like this: start_server = websockets.serve(send_data_to_client, host, port)
self.socket_server = start_server
# need to pass the loop because the socket server lives in another thread
loop = asyncio.get_event_loop()
# start the server
def start_socket_server():
loop.run_until_complete(start_server)
loop.run_forever()
self.socket_thread = Thread(
target=start_socket_server, daemon=True, name="socket_server")
logger.info("Starting socket server on {}:{}".format(host, port))
self.socket_thread.start() No idea yet how to adapt your fix, I guess I need to close the thread or smth. |
The "fix" is just doing:
or
I don't really understand what the problem is perhaps? |
I am not using directly this lib actually sorry, but just hit the same downstream issue, that's why I am posting here because you seem to be the most active project regarding this. |
Change back to
self.executor.shutdown(wait=True)
here when https://bugs.python.org/issue36281 is fixed.Related #156.
The text was updated successfully, but these errors were encountered: