Help me use my Dual Core CPU!
Robin Becker
robin at reportlab.com
Wed Sep 13 05:41:59 EDT 2006
Simon Wittber wrote:
> Paul Rubin wrote:
>> "Simon Wittber" <simonwittber at gmail.com> writes:
>>> I've just noticed that os.fork is not available on Win32. Ouch.
>> Use the subprocess module.
>
> I can't see how subprocess.Popen can replace a fork. Using a manually
> started process is not really viable, as it does not automatically
> share pre-built (read-only) data between the processes. If it can, I'd
> really like to know how...
>
> Yikes. This is a bummer. The conclusion seems to be, I cannot use any
> common cross platform, true concurrency strategies in my games. On top
> of that, I can't really use any form of concurrency on Win32.
>
> Lets hope we get some super fast SMP friendly backends for PyPy sooner
> rather than later!
>
> -Sw.
>
Nobody seems to have mentioned POSH http://poshmodule.sourceforge.net
which used almost to work. I assume it's busted for later pythons and the author
says it's just a demonstration.
Anandtech demoed an 8 core mac pro machine and were unable to "max out the
cpus". Python needs some kind of multi cpu magic pretty quickly or we'll all end
up using erlang :)
As for subprocess I don't see it as much use unless we can at least determine
the number of cpu's and also set the cpu affinity easy with occam maybe not in
python.
--
Robin Becker
More information about the Python-list
mailing list