projects
/
python_utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Teach site_location about the .local hostname suffix that the mac
[python_utils.git]
/
parallelize.py
diff --git
a/parallelize.py
b/parallelize.py
index 698a7eca130d2ffc64a9619c89bdc2be5eb34ba9..b2a1cedb988d98d78cf7654e3f65d4dfaa8beff6 100644
(file)
--- a/
parallelize.py
+++ b/
parallelize.py
@@
-2,13
+2,16
@@
"""A decorator to help with dead simple parallelization."""
"""A decorator to help with dead simple parallelization."""
+
import atexit
import atexit
-from enum import Enum
import functools
import typing
import functools
import typing
+from enum import Enum
class Method(Enum):
class Method(Enum):
+ """How should we parallelize; by threads, processes or remote workers?"""
+
THREAD = 1
PROCESS = 2
REMOTE = 3
THREAD = 1
PROCESS = 2
REMOTE = 3