qmk format-python

This commit is contained in:
Nick Brassel 2023-09-29 12:48:13 +10:00
parent 0110a4f79d
commit bf40eebf73
No known key found for this signature in database

View File

@ -4,6 +4,7 @@ import contextlib
import functools import functools
import multiprocessing import multiprocessing
@contextlib.contextmanager @contextlib.contextmanager
def parallelize(do_parallel): def parallelize(do_parallel):
"""Returns a function that can be used in place of a map() call. """Returns a function that can be used in place of a map() call.
@ -24,4 +25,3 @@ def parallelize(do_parallel):
with multiprocessing.Pool() as pool: with multiprocessing.Pool() as pool:
yield pool.imap_unordered yield pool.imap_unordered
return