3 ms·
There is a difference between threads and processes. What you outline is how the python multiprocessing library works.
by frozenport 11y ago
There is a difference between threads and processes. What you outline is how the python multiprocessing library works.
- sitkack 11y agoThink of it like running multiple python processes inside the same memory space so that copying between interpreters is by reference, not value. Nothing has to be serialized.
- deleted 11y ago[deleted]
- onnoonno 11y agoHow do you avoid damaging the consistency of Python objects then? I think the only way to do that would be to have a reentrant lock for each object individually. Isn't that potentially a big performance issue? I think that is the main reason behind this quote from the article: > Several attempts have been made over the years and failed to do it without sacrificing single-threaded performance.