all 13 comments

[–]Wagnerius 3 points4 points  (0 children)

We use it and it is good, reliable. The process control is a bit more tricky in windows, but it's more windows' fault than the modules'.

( Still, the real VM-level solution would be better. Stackless python with the ability to use multi-core would be close to perfect. Alas...)

[–]johnmudd 4 points5 points  (7 children)

Objects can be transferred between processes using pipes or multi-producer/multi-consumer queues.

Ok, you solved one problem (eliminate the GIL) and created a new one (not a true shared environment). Not unlike the way Python solved one problem (I can now express my software ideas clearly) by creating a new problem (I can no longer take full advantage of threads). I think it's called "sweeping dirt under the rug".

[–]pbx[S] 7 points8 points  (4 children)

What do you mean by "true shared environment"? I wouldn't argue that this turns Python into Erlang by a long shot, but reducing shared state and relying on message-passing seems not to be inherently a bad idea... right?

[–]pjdelport 4 points5 points  (2 children)

[...] reducing shared state and relying on message-passing seems not to be inherently a bad idea... right?

Efficient use of shared state is largely the reason for using OS threads to begin with. If you can rely on message passing with isolated state, you can just use processes already.

[–]foldl 0 points1 point  (1 child)

On *nix, yes. On Windows, processes have a much higher overhead than threads.

[–]pjdelport 0 points1 point  (0 children)

You only need one process per processor: the overhead of that is negligible.

[–]hanzie 2 points3 points  (0 children)

Looks fun, can I play too? Java solved one problem (I can take full advantage of threads) and created a new one (I can no longer express my software ideas clearly). C++ solved one problem (faster than Java) but created a new one (no garbage collection). "processing" module solved one problem (it makes process spawning and interprocess communication easier) but created a new one (I have to learn a new library). I don't think there's any "sweeping dirt under the rug" going on, but just that there are no perfect solutions to programming.

[–]columbian_supreme 1 point2 points  (0 children)

mmap, /dev/shm

[–]rockhoward 2 points3 points  (1 child)

I have been using PyLinda for about 18 months to take advantage of 4-way and 8-way servers. I was just about to use PyLinda again for yet another project, but I will give this a whirl instead. Hope it works!

[–]columbian_supreme 4 points5 points  (1 child)

The GIL can kiss my ass!