I am running a multi-process code in Python with a shared array. The problem is that I can't initialise that array...
To share an array in a multi-process program I have read I need to use multiprocessing.Array, but when I try it as in the code below it is not printing anything + I don't have error messages.
import multiprocessing
...
...
if __name__ == "__main__":
an_array= multiprocessing.Array("i", [1,2])
print(an_array) # why does it not print anything? I was expecting to print [1,2]
p1 = multiprocessing.Process(target=function1, args = [an_array, 3]
<SynchronizedArray wrapper for <multiprocessing.sharedctypes.c_int_Array_2 object at 0x7f7bbc63df28>>. I am running Ubuntu.