MCPcopy Index your code
hub / github.com/python/cpython / apply_async

Method apply_async

Lib/multiprocessing/pool.py:453–461  ·  view source on GitHub ↗

Asynchronous version of `apply()` method.

(self, func, args=(), kwds={}, callback=None,
            error_callback=None)

Source from the content-addressed store, hash-verified

451 return (item for chunk in result for item in chunk)
452
453 def apply_async(self, func, args=(), kwds={}, callback=None,
454 error_callback=None):
455 '''
456 Asynchronous version of `apply()` method.
457 '''
458 self._check_running()
459 result = ApplyResult(self, callback, error_callback)
460 self._taskqueue.put(([(result._job, 0, func, args, kwds)], None))
461 return result
462
463 def map_async(self, func, iterable, chunksize=None, callback=None,
464 error_callback=None):

Callers 8

test_async_timeoutMethod · 0.95
applyMethod · 0.95
testFunction · 0.80
test_asyncMethod · 0.80

Calls 3

_check_runningMethod · 0.95
ApplyResultClass · 0.85
putMethod · 0.45

Tested by 6

test_async_timeoutMethod · 0.76
test_asyncMethod · 0.64