3 ms·
Python already has fully shared state across multiprocesses: https://docs.python.org/3.7/library/multiprocessing.html#shared-ctypes-objects https://docs.python.
by icebraining 7y ago
Python already has fully shared state across multiprocesses: https://docs.python.org/3.7/library/multiprocessing.html#shared-ctypes-objects https://docs.python.org/3.7/library/multiprocessing.html#sha...
- maayank 7y agoVery limited shared state (only c types, including structs), which in practice means (for non trivial apps) some form of marshaling from python classes to the C structs. Boilerplate abound! In other words, nothing behind mmap with simple size calculations, which is what you'd really want to abstract away.
- olliej 7y agoAs @maayank has already said, python’s shared state is limited to pure c-structures, rather than actual python objects. Web workers have the same through SharedArrayBuffer (I am unsure though whether the security pains from spectre, etc have allowed them to be turned on again). SharedArrayBuffer is fundamentally the same as python’s C-only sharing - a bunch of raw bytes not tied to the host environment’s type system.