Change locking boundaries for shared dict. Add a unit test.
[python_utils.git] / parallelize.py
index 98f883c5716ae8fa3d67101b1d38d20dece7a0b6..cd3eff4e9c539c25d7d5cf3deb52a494bd2bd0f0 100644 (file)
@@ -2,6 +2,7 @@
 
 """A decorator to help with dead simple parallelization."""
 
+
 import atexit
 from enum import Enum
 import functools
@@ -15,9 +16,7 @@ class Method(Enum):
 
 
 def parallelize(
-    _funct: typing.Optional[typing.Callable] = None,
-    *,
-    method: Method = Method.THREAD
+    _funct: typing.Optional[typing.Callable] = None, *, method: Method = Method.THREAD
 ) -> typing.Callable:
     """Usage: