title: Fatal Python error: could not acquire lock for <_io.BufferedReader name='<stdin>'> at interpreter shutdown, possibly due to daemon threads
body: <p>I want to write a python script in which if I doesn't enter any value through input command, then it should assign a default a value to my variable after 30 seconds, my platform is windows 7</p>
  
  <pre><code>from func_timeout import func_timeout, FunctionTimedOut
  
  def doit():
  
      value = input("enter")
  
  try:
      doitReturnValue = func_timeout(5, doit)
  
  except FunctionTimedOut:
      value = "default value"
  </code></pre>
  
  <p>This is the error i am getting:</p>
  
  <pre><code>"C:\Users\Arpit\PycharmProjects\Complete Test\venv\Scripts\python.exe" "C:/Users/Arpit/PycharmProjects/Complete Test/test_for_timeout.py"
  enterFatal Python error: could not acquire lock for &lt;_io.BufferedReader name='&lt;stdin&gt;'&gt; at interpreter shutdown, possibly due to daemon threads
  Python runtime state: finalizing (tstate=00000000003CAE20)
  
  Thread 0x00000c18 (most recent call first):
    File "C:\Users\Arpit\AppData\Local\Programs\Python\Python38\lib\threading.py", line 1027 in _wait_for_tstate_lock
    File "C:\Users\Arpit\AppData\Local\Programs\Python\Python38\lib\threading.py", line 1015 in join
    File "C:\Users\Arpit\PycharmProjects\Complete Test\venv\lib\site-packages\func_timeout\StoppableThread.py", line 126 in run
    File "C:\Users\Arpit\AppData\Local\Programs\Python\Python38\lib\threading.py", line 932 in _bootstrap_inner
    File "C:\Users\Arpit\AppData\Local\Programs\Python\Python38\lib\threading.py", line 890 in _bootstrap
  
  Thread 0x0000106c (most recent call first):
    File "C:/Users/Arpit/PycharmProjects/Complete Test/test_for_timeout.py", line 7 in doit
    File "C:\Users\Arpit\PycharmProjects\Complete Test\venv\lib\site-packages\func_timeout\dafunc.py", line 68 in funcwrap
    File "C:\Users\Arpit\AppData\Local\Programs\Python\Python38\lib\threading.py", line 870 in run
    File "C:\Users\Arpit\AppData\Local\Programs\Python\Python38\lib\threading.py", line 932 in _bootstrap_inner
    File "C:\Users\Arpit\AppData\Local\Programs\Python\Python38\lib\threading.py", line 890 in _bootstrap
  
  Current thread 0x00001850 (most recent call first):
  &lt;no Python frame&gt;
  
  Process finished with exit code 3
  </code></pre>