Python doesn't provide a way to end a thread, send it a signal, adjust its schedule, or perform other advanced operations.
If you need to terminate a thread, you need to program the thread to poll at a certain point to exit. But if a thread keeps blocking on an I/O operation, it can never return and can't check whether it has been terminated. To properly handle these issues requires careful manipulation of threads with timeout loops.