python语言input和func_timeout、while结合报错

请教下各位,想用func_timeout库去循环几个input超时,结束时无法关闭进程,怎么处理? 如下图

python错误, _enter_buffered_busy: 无法获取<_io的锁。解释器关闭时的 BufferedReader name=''>,可能是由于守护程序线程

Python error: _enter_buffered_busy: could not acquire lock for <_io.BufferedReader name=''> at interpreter shutdown, possibly due to daemon threads
Python runtime state: finalizing (tstate=0x000001fd3c0e8da0)

img

源码:

  import sys
from func_timeout import func_timeout

a = 0
a_max = 3
while a < a_max:
    try:
        msg = func_timeout(5, lambda : input(f"请输入当前{a}的数值:"))
    except:
        msg = "超时输入,默认值为0"
    print(msg)
    a+=1
sys.exit()

你别执行sys.exit()
它执行完自然进程就结束了
再说,它现在也只是报了个错,进程还是结束了的,没有死进程呀