MCPcopy Create free account
hub / github.com/ActiveState/code / apply

Method apply

recipes/Python/576519_Thread_pool_same_API/recipe-576519.py:114–117  ·  view source on GitHub ↗

Equivalent of the apply() builtin function. It blocks till the result is ready.

(self, func, args=(), kwds=dict())

Source from the content-addressed store, hash-verified

112 self._workers.append(thr)
113
114 def apply(self, func, args=(), kwds=dict()):
115 """Equivalent of the apply() builtin function. It blocks till
116 the result is ready."""
117 return self.apply_async(func, args, kwds).get()
118
119 def map(self, func, iterable, chunksize=None):
120 """A parallel equivalent of the map() builtin function. It

Callers 6

_testFunction · 0.95
recipe-577801.jsFile · 0.45
recipe-577310.jsFile · 0.45
recipe-579002.jsFile · 0.45
recipe-577790.jsFile · 0.45
recipe-578068.jsFile · 0.45

Calls 3

apply_asyncMethod · 0.95
dictFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected