This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Minor errors in multiprocessing docs
Type: Stage:
Components: Documentation Versions: Python 3.0, Python 2.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: jnoller Nosy List: dripton, erickt, georg.brandl, jnoller, kjohnson, osvenskan
Priority: normal Keywords:

Created on 2008-10-02 01:23 by kjohnson, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (15)
msg74150 - (view) Author: Kent Johnson (kjohnson) * Date: 2008-10-02 01:23
In the docs for AsyncResult
http://docs.python.org/dev/library/multiprocessing.html#multiprocessing.pool.AsyncResult

"get([timeout)" is missing a ]

In the example following, it refers to pool.applyAsync() in two places;
the docs spell this apply_async(), one of them must be wrong :-)
msg74176 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-10-02 17:00
There's also an applyAsync left in the introductory Pool example.

Jesse, while you're at it, could you please add a blurb that some
examples won't work when tried at the interactive interpreter (and
perhaps also why)?
msg74177 - (view) Author: Jesse Noller (jnoller) * (Python committer) Date: 2008-10-02 17:07
Which examples are you talking about Georg?
msg74178 - (view) Author: Jesse Noller (jnoller) * (Python committer) Date: 2008-10-02 17:08
Also, several things which are properties are still referred to as methods 
and include the () chars for the call
msg74179 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-10-02 17:10
I e.g. tried a minimal example with Pool.map():

>>> from multiprocessing import Pool
>>> p = Pool(5)
>>> def f(x):
...  return x*x
...
>>> p.map(f, [1,2,3])
Process PoolWorker-1:
Traceback (most recent call last):
  File "/home/gbr/devel/python/Lib/multiprocessing/process.py", line
231, in _bootstrap
    self.run()
  File "/home/gbr/devel/python/Lib/multiprocessing/process.py", line 88,
in run
    self._target(*self._args, **self._kwargs)
  File "/home/gbr/devel/python/Lib/multiprocessing/pool.py", line 57, in
worker
Process PoolWorker-2:

[some more exceptions]

    task = get()
  File "/home/gbr/devel/python/Lib/multiprocessing/queues.py", line 339,
in get
    return recv()
AttributeError: 'module' object has no attribute 'f'

And then the prompt doesn't reappear.
msg74180 - (view) Author: Jesse Noller (jnoller) * (Python committer) Date: 2008-10-02 17:16
Ok, let me take a look at that
msg74182 - (view) Author: Jesse Noller (jnoller) * (Python committer) Date: 2008-10-02 17:31
On Thu, Oct 2, 2008 at 1:10 PM, Georg Brandl <report@bugs.python.org> wrote:
>
> Georg Brandl <georg@python.org> added the comment:
>
> I e.g. tried a minimal example with Pool.map():
>
>>>> from multiprocessing import Pool
>>>> p = Pool(5)
>>>> def f(x):
> ...  return x*x
>

I'll add a note. I'm going to file a separate bug, I don't think that
should happen and it's fairly embarrassing that it does.
msg74183 - (view) Author: Kent Johnson (kjohnson) * Date: 2008-10-02 17:39
On Thu, Oct 2, 2008 at 1:07 PM, Jesse Noller <report@bugs.python.org> wrote:
>
> Jesse Noller <jnoller@gmail.com> added the comment:
>
> Which examples are you talking about Georg?

I think you mean me, not Georg...I was referring to the example that
immediately follows
http://docs.python.org/library/multiprocessing.html#multiprocessing.pool.AsyncResult.successful
msg74580 - (view) Author: David Ripton (dripton) Date: 2008-10-09 15:15
Also, two of the example code blurbs in that page still refer to the
module as "processing" instead of "multiprocessing".  (Search for
"import processing" to find them.)
msg74868 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-10-16 21:36
Fixed the "processing" name in r66939.
msg75083 - (view) Author: Philip Semanchuk (osvenskan) * Date: 2008-10-22 15:56
The Synchronization primitives section should mention that
sem_timedwait() isn't supported under OS X <=10.5.5 (and possibly later
versions) so as a result timeouts passed to acquire() will be ignored
(or raise an error?)

http://docs.python.org/dev/library/multiprocessing.html#synchronization-primitives
msg75109 - (view) Author: Jesse Noller (jnoller) * (Python committer) Date: 2008-10-22 21:08
fix_up_logger doesn't exist in the port, but is used in the mp_distributing.py example
msg75202 - (view) Author: Erick Tryzelaar (erickt) Date: 2008-10-25 04:25
fyi, the multiprocessing docs also refer to applyAync, but the function 
was renamed to apply_async. This is also in the python 3.0 docs.
msg76239 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-11-22 08:54
Fixed applyAsync and missing ] in r67335.
msg76547 - (view) Author: Jesse Noller (jnoller) * (Python committer) Date: 2008-11-28 18:49
Warning added for georg's issue, all doc errors fixed on trunk, py3k and 
2.6.1 maint. see r67419
History
Date User Action Args
2022-04-11 14:56:39adminsetgithub: 48262
2008-11-28 18:49:48jnollersetstatus: open -> closed
resolution: fixed
messages: + msg76547
2008-11-22 08:54:27georg.brandlsetmessages: + msg76239
2008-10-25 04:25:22ericktsetnosy: + erickt
messages: + msg75202
versions: + Python 3.0
2008-10-22 21:08:44jnollersetmessages: + msg75109
2008-10-22 15:56:09osvenskansetnosy: + osvenskan
messages: + msg75083
2008-10-16 21:36:50georg.brandlsetmessages: + msg74868
2008-10-09 15:15:15driptonsetnosy: + dripton
messages: + msg74580
2008-10-02 17:39:56kjohnsonsetmessages: + msg74183
2008-10-02 17:31:37jnollersetmessages: + msg74182
2008-10-02 17:16:33jnollersetmessages: + msg74180
2008-10-02 17:10:08georg.brandlsetmessages: + msg74179
2008-10-02 17:08:21jnollersetmessages: + msg74178
2008-10-02 17:07:55jnollersetmessages: + msg74177
2008-10-02 17:00:25georg.brandlsetmessages: + msg74176
2008-10-02 12:32:25jnollersetassignee: georg.brandl -> jnoller
nosy: + jnoller
2008-10-02 01:23:39kjohnsoncreate