Skip to content

Commit 328c06e

Browse files
committed
style(pool): use atexit.register decorator in place of function
1 parent dcdd92e commit 328c06e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pebble/pool/process.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,7 @@ def process_chunk(function: Callable, chunk: list) -> list:
490490
return [process_execute(function, *args) for args in chunk]
491491

492492

493+
@atexit.register
493494
def interpreter_shutdown():
494495
global GLOBAL_SHUTDOWN
495496
GLOBAL_SHUTDOWN = True
@@ -510,9 +511,6 @@ def dictionary_values(dictionary: dict) -> tuple:
510511
pass
511512

512513

513-
atexit.register(interpreter_shutdown)
514-
515-
516514
GLOBAL_SHUTDOWN = False
517515
WORKERS_NAME = 'pebble_pool_worker'
518516
PICKLING_ERRORS = AttributeError, pickle.PicklingError, TypeError

0 commit comments

Comments
 (0)