Where is documentation for multiprocessing.pool.ApplyResult?

10,882

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.)

Share:
10,882
Mark Gerolimatos
Author by

Mark Gerolimatos

Currently working on streaming video distribution. Developing on Android systems, both native/C++ and API-based/Java code; on OS-X/iOS in C++ and Tcl-C (strangely called "Objective" C); on Linux in Scala/Java, BASH, PERL and Python.

Updated on June 03, 2022

Comments

  • Mark Gerolimatos
    Mark Gerolimatos almost 2 years

    There is frighteningly little strict API documentation (read: ZERO) for multiprocessing.pool.ApplyResult. The multiprocessing explanation doc talks about ApplyResults, 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.