diff options
author | 2023-03-11 19:53:45 -0500 | |
---|---|---|
committer | 2023-03-11 19:53:45 -0500 | |
commit | 9952110d6649cdc52d273a09229321bb4a1dc393 (patch) | |
tree | 58c0eeac4b8f0a08545838471a537a504779a03a | |
parent | Merge pull request #170 from python-discord/files-exclude-hidden (diff) |
Ensure mp Pool is not reused to avoid broken pipes from shutdown
-rw-r--r-- | snekbox/utils/timed.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/snekbox/utils/timed.py b/snekbox/utils/timed.py index 02388ff..1221df0 100644 --- a/snekbox/utils/timed.py +++ b/snekbox/utils/timed.py @@ -29,7 +29,7 @@ def timed( """ if kwds is None: kwds = {} - with multiprocessing.Pool(1) as pool: + with multiprocessing.Pool(1, maxtasksperchild=1) as pool: result = pool.apply_async(func, args, kwds) try: return result.get(timeout) |