Busy-waiting in a 100ms delay loop for a parent to MAYBE signal that your thread should exit is ugly and doesn't work at all on platforms which have to use multiprocessing instead of native threads.
The best way to do this is to also wait on a pipe. Let the parent write a byte to the pipe if it wants its children to exit; let the child thread exit if the pipe's read side is ready.
Busy-waiting in a 100ms delay loop for a parent to MAYBE signal that your thread should exit is ugly and doesn't work at all on platforms which have to use multiprocessing instead of native threads.
The best way to do this is to also wait on a pipe. Let the parent write a byte to the pipe if it wants its children to exit; let the child thread exit if the pipe's read side is ready.