如何在退出时杀死所有线程而不访问线程?

How kill all threads without access to threads on exit?

如何在退出时杀死所有线程而不访问线程? 我使用模块线程

线程在 python 中不可终止。

您可以使用替代线程库,例如 kthread