Skip to content

Conversation

@ppigazzini
Copy link
Collaborator

Reverts #1925

PROD updated to python 3.12.3 that has the bugfix python/cpython#117029

# test_interpreter_shutdown.py
import threading, time

def main():
    threading.Thread(target=bloop).start()

def bloop():
    time.sleep(0.5)
    threading.Thread(target=print, args=("new thread running",)).start()

main()
  • python 3.12.3:
$ python3 test_interpreter_shutdown.py
new thread running
  • python 3.12.2:
$ python3 test_interpreter_shutdown.py
Exception in thread Thread-1 (bloop):
Traceback (most recent call last):
  File "/home/fishtest/.pyenv/versions/3.12.2/lib/python3.12/threading.py", line 1073, in _bootstrap_inner
    self.run()
  File "/home/fishtest/.pyenv/versions/3.12.2/lib/python3.12/threading.py", line 1010, in run
    self._target(*self._args, **self._kwargs)
  File "/home/fishtest/test_interpreter_shutdown.py", line 8, in bloop
    threading.Thread(target=print, args=("new thread running",)).start()
  File "/home/fishtest/.pyenv/versions/3.12.2/lib/python3.12/threading.py", line 992, in start
    _start_new_thread(self._bootstrap, ())
RuntimeError: can't create new thread at interpreter shutdown

@ppigazzini ppigazzini added bug server server side changes update code change to account external change (Stockfish, book etc.) labels Apr 13, 2024
@ppigazzini ppigazzini merged commit d3273e8 into master Apr 13, 2024
@ppigazzini ppigazzini deleted the revert-1925-race_flush_all_buffers branch April 13, 2024 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug server server side changes update code change to account external change (Stockfish, book etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants