Skip to content

Commit

Permalink
bmk: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmueller committed Aug 13, 2024
1 parent cca6050 commit a8b5d3b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions benchmark/bm_write_deque_writer_thread.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import atexit
from collections import deque
import pathlib
import shutil
import tempfile

import multiprocessing as mp
Expand Down Expand Up @@ -30,8 +32,9 @@ def setup():
writer_dq.append(("mask", rng.random((batch_size, 80, 320)) > .5))
writer_dq.append(("temp", rng.normal(23, size=batch_size)))

path_out = pathlib.Path(
tempfile.mkdtemp(prefix=pathlib.Path(__file__).name)) / "out.rtdc"
temp_dir = tempfile.mkdtemp(prefix=pathlib.Path(__file__).name)
atexit.register(shutil.rmtree, temp_dir, ignore_errors=True, onerror=None)
path_out = pathlib.Path(temp_dir) / "out.rtdc"


def main():
Expand Down

0 comments on commit a8b5d3b

Please sign in to comment.