projects
/
python_utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make smart futures avoid polling.
[python_utils.git]
/
parallelize.py
diff --git
a/parallelize.py
b/parallelize.py
index 334dc4e992c56aebcad796d2f6696bd63b14653e..d9c202faf00d56cf4cfc43e36c821998c249c7c4 100644
(file)
--- a/
parallelize.py
+++ b/
parallelize.py
@@
-6,13
+6,6
@@
from enum import Enum
import functools
import typing
import functools
import typing
-import executors
-import smart_future
-
-ps_count = 0
-thread_count = 0
-remote_count = 0
-
class Method(Enum):
THREAD = 1
class Method(Enum):
THREAD = 1
@@
-64,6
+57,9
@@
def parallelize(
@functools.wraps(funct)
def inner_wrapper(*args, **kwargs):
@functools.wraps(funct)
def inner_wrapper(*args, **kwargs):
+ import executors
+ import smart_future
+
# Look for as of yet unresolved arguments in _funct's
# argument list and resolve them now.
newargs = []
# Look for as of yet unresolved arguments in _funct's
# argument list and resolve them now.
newargs = []