summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-11-22 08:54:21 (GMT)
committerGeorg Brandl <georg@python.org>2008-11-22 08:54:21 (GMT)
commite3d70aed8ef41d321f528016ec58c9b92438a0ac (patch)
tree353b0b12e73177c0cd6374e6d0386bdcdace3727 /Doc/library
parent9290503b2af7eed9667aefefd823e058385dc91d (diff)
downloadcpython-e3d70aed8ef41d321f528016ec58c9b92438a0ac.zip
cpython-e3d70aed8ef41d321f528016ec58c9b92438a0ac.tar.gz
cpython-e3d70aed8ef41d321f528016ec58c9b92438a0ac.tar.bz2
Fix two mp doc issues from #4012.
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/multiprocessing.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/multiprocessing.rst b/Doc/library/multiprocessing.rst
index e15ff4d..8ea561f 100644
--- a/Doc/library/multiprocessing.rst
+++ b/Doc/library/multiprocessing.rst
@@ -232,7 +232,7 @@ For example::
if __name__ == '__main__':
pool = Pool(processes=4) # start 4 worker processes
- result = pool.applyAsync(f, [10]) # evaluate "f(10)" asynchronously
+ result = pool.apply_async(f, [10]) # evaluate "f(10)" asynchronously
print(result.get(timeout=1)) # prints "100" unless your computer is *very* slow
print(pool.map(f, range(10))) # prints "[0, 1, 4,..., 81]"
@@ -1505,7 +1505,7 @@ with the :class:`Pool` class.
The class of the result returned by :meth:`Pool.apply_async` and
:meth:`Pool.map_async`.
- .. method:: get([timeout)
+ .. method:: get([timeout])
Return the result when it arrives. If *timeout* is not ``None`` and the
result does not arrive within *timeout* seconds then
@@ -1535,7 +1535,7 @@ The following example demonstrates the use of a pool::
if __name__ == '__main__':
pool = Pool(processes=4) # start 4 worker processes
- result = pool.applyAsync(f, (10,)) # evaluate "f(10)" asynchronously
+ result = pool.apply_async(f, (10,)) # evaluate "f(10)" asynchronously
print(result.get(timeout=1)) # prints "100" unless your computer is *very* slow
print(pool.map(f, range(10))) # prints "[0, 1, 4,..., 81]"
@@ -1546,7 +1546,7 @@ The following example demonstrates the use of a pool::
print(it.next(timeout=1)) # prints "4" unless your computer is *very* slow
import time
- result = pool.applyAsync(time.sleep, (10,))
+ result = pool.apply_async(time.sleep, (10,))
print(result.get(timeout=1)) # raises TimeoutError