Issue 5738: multiprocessing example wrong (original) (raw)

Created on 2009-04-11 20:53 by ngie, last changed 2022-04-11 14:56 by admin. 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
2022-04-11 14:56:47 admin set github: 49988
2009-11-21 14:30:53 jnoller set status: open -> closedresolution: fixedmessages: +
2009-11-21 13:52:51 jnoller set messages: +
2009-11-21 13:41:48 asksol set nosy: + asksolmessages: +
2009-07-29 22:22:51 jlmaccal set files: + mp_patch.diffnosy: + jlmaccalmessages: + keywords: + patch
2009-05-03 04:34:44 ngie set messages: +
2009-04-29 09:16:21 asmodai set nosy: + asmodaimessages: +
2009-04-11 23:12:04 ngie set messages: +
2009-04-11 20:57:03 jnoller set messages: +
2009-04-11 20:55:01 benjamin.peterson set assignee: georg.brandl -> jnollernosy: + jnoller
2009-04-11 20:53:56 ngie create