There is frighteningly little strict API documentation (read: ZERO) for multiprocessing.pool.ApplyResult
. The multiprocessing explanation doc talks about ApplyResult
s, but does not define them.
The same appears to apply to multiprocessing.pool.Pool
, although the Python multiprocessing guide appears to cover it better.
Even the ApplyResult
help()
results are paltry:
| get(self, timeout=None)
|
| ready(self)
|
| successful(self)
|
| wait(self, timeout=None)
Get()
and Ready()
I get. Those are fine.
I have absolutely no idea what wait()
is for, given that you are
dealing with a "pool", which one would assume would waits for you in
the get()
call. Is this "wait for the result, but don't get it now" Or is it an OS-style wait? And if so, what would that even mean?
I am equally unsure of what successful()
is all about.
You're right that there is in a glitch in the documentation: the class is actually documented as AsyncResult, not ApplyResult. The two are different names for the same class:
>>> multiprocessing.pool.ApplyResult is multiprocessing.pool.AsyncResult
True
The name may have been changed at some point and the docs weren't consistently updated, but everything is documented, it's just documented under the wrong name. (There is a closed bug in which someone pointed out that the docs mention AsyncResult but the class is actually called ApplyResult, so they added AsyncResult as an alias.)