3 ms·
I don't use python all that much, but out of curiosity, what's the problem with multiprocessing? In the languages I do develop in, I find it much easier to rea
by aidenn0 11y ago
I don't use python all that much, but out of curiosity, what's the problem with multiprocessing? In the languages I do develop in, I find it much easier to reason about than multithreading.
- andor 11y agoData exchanged between the processes is serialized with pickle. Pickling is slow, adds latency, and doesn't work on all objects. https://docs.python.org/2/library/multiprocessing.html#pipes-and-queues https://docs.python.org/2/library/multiprocessing.html#pipes...
- aidenn0 11y agoThat sucks; there's no shared-memory message-queue implementation?
- beagle3 11y agoany message queue implementation would require serializing (which the Python standard library provides with "pickling"). If there was a reasonable way to share live objects without the GIL, Python threads would use them.