classification
Title: multiprocessing example wrong
Type: enhancement Stage:
Components: Documentation Versions: Python 3.0, Python 2.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: jnoller Nosy List: asksol, asmodai, georg.brandl, jlmaccal, jnoller, ngie
Priority: normal Keywords: patch

Created on 2009-04-11 20:53 by ngie, last changed 2009-11-21 14:30 by jnoller. This issue is now closed.

Files
File name Uploaded Description Edit
mp_patch.diff jlmaccal, 2009-07-29 22:22 patch to allow distributing code from documentation to run
Messages (9)
msg85874 - (view) Author: Enji Cooper (ngie) * Date: 2009-04-11 20:53
The last example on the multiprocessing documentation page is clearly
wrong. It references a lot of renamed / deprecated API's from processing
that are no longer in multiprocessing.

I'll try and come up with a comparable working example on all platforms
(I use FreeBSD).
msg85876 - (view) Author: Jesse Noller (jnoller) * (Python committer) Date: 2009-04-11 20:57
Ugh, I thought that was cleaned up. Don't bother with FreeBSD, or any 
other BSDes. If you're willing to do it, just make it work on linux. MP 
support on BSD is severely broken right now.
msg85879 - (view) Author: Enji Cooper (ngie) * Date: 2009-04-11 23:12
How about this? I'll do both :).

I'm avoiding sync + semaphore stuff because it's still non-portable
(Issue 3770 fun), even though I have a functioning copy of FreeBSD...
but I do have a Mac, VMware fusion, etc, and I'll toss in a working
example with Fedora 10.
msg86786 - (view) Author: Jeroen Ruigrok van der Werven (asmodai) * (Python committer) Date: 2009-04-29 09:16
Garrett, I use FreeBSD myself too, so feel free to bounce anything my way.
msg86999 - (view) Author: Enji Cooper (ngie) * Date: 2009-05-03 04:34
Priorities shifted again at work, so I'll get around to this some time
around early June when I get an opportunity to implement multiprocessing
in my work code...

Thanks!
msg91071 - (view) Author: Justin MacCallum (jlmaccal) Date: 2009-07-29 22:22
I think this should either be fixed or removed from the documentation. It 
is very confusing as is. I have next to no idea what I'm doing, but I've 
attached a patch that allows this code to function, at least sort of. You 
can now create cluster and pool objects and run jobs using map or 
apply_async, for example. However, there are still problems with the 
shutdown of the pool.

I would very much like to see this functionality working correctly and 
robustly. A distributed Pool class would be very useful in, e.g. 
scientific programming.
msg95579 - (view) Author: Ask Solem (asksol) (Python committer) Date: 2009-11-21 13:41
Are we sure this fits the scope of multiprocessing? It's a nice feature, 
but such a long and complex example in the documentation is wrong IMHO, if 
this is something people need it should be implemented as a reusable 
solution, not as an example people copy and paste.
msg95580 - (view) Author: Jesse Noller (jnoller) * (Python committer) Date: 2009-11-21 13:52
On Sat, Nov 21, 2009 at 8:41 AM, Ask Solem <report@bugs.python.org> wrote:
>
> Ask Solem <askh@opera.com> added the comment:
>
> Are we sure this fits the scope of multiprocessing? It's a nice feature,
> but such a long and complex example in the documentation is wrong IMHO, if
> this is something people need it should be implemented as a reusable
> solution, not as an example people copy and paste.

In hindsight; I agree - this belongs in an "addons" module someplace
outside the standard library. I'll remove it today - the one thing we
are short on though is manager examples.
msg95583 - (view) Author: Jesse Noller (jnoller) * (Python committer) Date: 2009-11-21 14:30
I've removed the example on all active branches. r76433 is the changelist
History
Date User Action Args
2009-11-21 14:30:53jnollersetstatus: open -> closed
resolution: fixed
messages: + msg95583
2009-11-21 13:52:51jnollersetmessages: + msg95580
2009-11-21 13:41:48asksolsetnosy: + asksol
messages: + msg95579
2009-07-29 22:22:51jlmaccalsetfiles: + mp_patch.diff

nosy: + jlmaccal
messages: + msg91071

keywords: + patch
2009-05-03 04:34:44ngiesetmessages: + msg86999
2009-04-29 09:16:21asmodaisetnosy: + asmodai
messages: + msg86786
2009-04-11 23:12:04ngiesetmessages: + msg85879
2009-04-11 20:57:03jnollersetmessages: + msg85876
2009-04-11 20:55:01benjamin.petersonsetassignee: georg.brandl -> jnoller

nosy: + jnoller
2009-04-11 20:53:56ngiecreate