https://mp.weixin.qq.com/s/u5VGromE6iJmBBUoNaPFmw
pip install func_timeout
# -*- coding: utf-8 -*- import time from func_timeout import func_set_timeout @func_set_timeout(5) def task(): while True: print('hello world') time.sleep(1) if __name__ == '__main__': task()
标签:__,set,func,Python,win,timeout,超时 From: https://www.cnblogs.com/angdh/p/17789476.html