multiprocessing.pool.Pool.map_async()

map_async(func, iterable[, chunksize[, callback[, error_callback]]])

A variant of the map() method which returns a result object.

If callback is specified then it should be a callable which accepts a single argument. When the result becomes ready callback is applied to it, that is unless the call failed, in which case the error_callback is applied instead.

If error_callback is specified then it should be a callable which accepts a single argument. If the target function fails, then the error_callback is called with the exception instance.

Callbacks should complete immediately since otherwise the thread which handles the results will get blocked.

doc_python
2016-10-07 17:37:54
Comments
Leave a Comment

Please login to continue.