Question: Is there some sort of time out or interrupt to the socket.accept() function in python?
Info:
I have a program that has a child thread bound to a port and constantly accepting and tending and passing them to a queue for the main thread. Right now I'm trying to get the child thread to interrupt so it can deconstruct appropriately. I think it is possible for me to just simply stop the child thread and have the parent deconstruct the child, but there are other times where I want to be able to return early form accept so I just decided that would be the most useful approach.
So, is there a way that I can have a time out or cancel the accept method so the thread can return w/o having something connect to it first?