Skip to content

Tag: multiprocessing

Multiprocessing managers and custom classes

I do not know why, but I get this strange error whenever I try to pass to the method of a shared object shared custom class object. Python version: 3.6.3 Code: Error: What’s the problem here? Answer Found temporary solution here. I’ve managed to fix it by adding needed keyword to initializer of Au…

Python check isinstance multiprocessing.Manager().Queue()

I am using python 2.7 multiprocessing on windows 7: Output: My question is: I would like to check if a variable is an instance of a multiprocessing queue, how should i go about checking? I have referred to: Check for instance of Python multiprocessing.Connection? Accessing an attribute of a multiprocessing Pr…

Launch program with python on a specific core

there is any way to launch program by its API using python and run it on a specified core? i need to launch a cpu-expensive application about 5 times and run it on different core in order to save time. i’m using windows Answer The process can set its own affinity, here is what I do (you can change the

Shared memory in multiprocessing

I have three large lists. First contains bitarrays (module bitarray 0.8.0) and the other two contain arrays of integers. These data structures take quite a bit of RAM (~16GB total). If i start 12 sub-processes using: Does this mean that l1, l2 and l3 will be copied for each sub-process or will the sub-process…