summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/rangehttpserver
diff options
context:
space:
mode:
authorK900 <me@0upti.me>2021-10-19 15:42:27 +0300
committerK900 <me@0upti.me>2021-10-19 16:23:51 +0300
commita874235dff32bd77125034cfd9542a91b68efb03 (patch)
treee3671142191b84bd8eaf9d299e1fa77e8aa6f66b /pkgs/development/python-modules/rangehttpserver
parent0c084c89fe6406b1d76e448f234a206d9a23f837 (diff)
nixos/lib/test-driver: clean up threads correctly
The current implementation just forks off a thread to read QEMU's stdout and lets it exist forever. This, however, makes the interpreter shutdown racy, as the thread could still be running and writing out buffered stdout when the main thread exits (and since it's using the low level API, the worker thread does not get cleaned up by the atexit hooks installed by `threading`, either). So, instead of doing that, let's create a real `threading.Thread` object, and also explicitly `join` it along with the other stuff when cleaning up.
Diffstat (limited to 'pkgs/development/python-modules/rangehttpserver')
0 files changed, 0 insertions, 0 deletions