Skip to content

Commit ff97d12

Browse files
committed
fix: explicitly shutdown in pytest hook
1 parent 8118636 commit ff97d12

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/cocoindex/subprocess_exec.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
_logger = logging.getLogger(__name__)
3838

3939

40-
def _shutdown_pool_at_exit() -> None:
40+
def shutdown_pool_at_exit() -> None:
4141
"""Best-effort shutdown of the global ProcessPoolExecutor on interpreter exit."""
4242
global _pool, _pool_cleanup_registered # pylint: disable=global-statement
4343
print("Shutting down pool at exit")
@@ -65,7 +65,7 @@ def _get_pool() -> ProcessPoolExecutor:
6565
if not _pool_cleanup_registered:
6666
# Register the shutdown at exit at creation time (rather than at import time)
6767
# to make sure it's executed earlier in the shutdown sequence.
68-
atexit.register(_shutdown_pool_at_exit)
68+
atexit.register(shutdown_pool_at_exit)
6969
_pool_cleanup_registered = True
7070

7171
# Single worker process as requested

0 commit comments

Comments
 (0)