3 ms·
Maybe you can use shared memory. You could use raw mmap.mmap(), or use the sharedctypes multiprocessing submodule (https://docs.python.org/2/library/multiproces
by Wicher 11y ago
Maybe you can use shared memory. You could use raw mmap.mmap(), or use the sharedctypes multiprocessing submodule (https://docs.python.org/2/library/multiprocessing.html#module-multiprocessing.sharedctypes https://docs.python.org/2/library/multiprocessing.html#modul...) .
You'd allocate memory in the parent process and then you'd write to that memory from within the child processes. The Python function you're "multiprocessing" won't necessarily need to return anything.