Re:Why Not Python - the GIL hinders concurrency
by zbowling on Wednesday July 03, 2013 @03:08PM
(#5986831)
> Multiprocessing is the way to do parallelism. Deviating from that should be an exception
Unless you have a language that doesn't break down when you use threads. Threads are unquestionably easier and better to use for multiprocessing when they work without the tools you are using breaking that.
Re:Why Not Python - the GIL hinders concurrency
by yummyfajitas on Wednesday July 03, 2013 @03:18PM
(#5986905)
Multiprocessing is the way to do parallelism.
Nowadays I use Scala/Akka for concurrent event processing. As far as code organization goes it is a lot like multiprocessing. Just s/actor/process/. But unlike unix style forking/IPC, I don't have to waste memory/cpu cycles serializing/deserializing immutable messages just so another process can have a duplicated copy of it.
Re:Why Not Python - the GIL hinders concurrency
by dakimov on Wednesday July 03, 2013 @02:52PM
(#5986705)
Orly? If your language is handicapped maybe. In normal languages you have no problems with threads, and the assertion that multiprocessing is the way makes no sense.
Multiprocessing is the way to do parallelism. Deviating from that should be an exception -- for example, shared memory maps could be used to transfer select data objects instantaneously between the processes instead of serializing/deserializing over a pipe, and only those while still retaining separate process images. Threads were practically invented as a compensation for systems with heavy process image overhead.
I think Python is very Unix in this regard. And that's not a bad thing per se. Unix and Linux can do multiprocessing very efficiently.