def abort_executing_thread(thread: threading.Thread): """Abort the thread execution. Args: thread (threading.Thread): The thread to abort. """ # FIXME: Not recommended since _stop might be removed. thread._reset_internal_locks(False) thread._stop()