What do you want to save?
Add Code snippet
New code examples
-
Python 2022-03-03 06:30:02
shared list in multiprocessing python
import multiprocessing manager = multiprocessing.Manager() shared_list = manager.list() def worker1(l): l.append(1) def worker2(l): l.append(2) process1 = multiprocessing.Process( target=worker1, args=[shared_list]) process2 = multiprocessi... Add solution -
Python 2021-10-22 22:26:06
shared SHMEM python
>>> from multiprocessing.managers import SharedMemoryManager >>> smm = SharedMemoryManager() >>> smm.start() # Start the process that manages the shared memory blocks >>> sl = smm.ShareableList(range(4)) >>> s... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5