What is the best way to modify the following Julia code:

my_output = pmap(x -> my_function(x, my_shared_array), x_list)

so that 'output' is consistent with 

my_output = map(x -> my_function(x, myarray), x_list)?

My naive attempt above resulted in a an error:  
RemoteException(pid#, CapturedException(UndefVarError: 
my_shared_array),...  which I understand from other posts is because the 
other processes do not know of my_shared_array.

However, attempts to use various permutations of @sync @async have resulted 
in output = Task (done) @x0007 etc., and not the desired 'output' list. 


Reply via email to