I've been using the sendto() method to send variables between workers
I was under the impression that in Julia, functions were 'first class citizens', but I cannot transfer functions between workers using the sendto() method
What is the recommended way of transferring predefined methods between workers?
Update
I seem to be able to use the sendto() method to send anonymous functions
a = function(x)
x*2
end
sendto(2,a=a)
remotecall_fetch(2,a,5)
4
as opposed to
function g(x)
x*2
end
sendto(2,g=g)
remotecall_fetch(2,g,10)
ERROR: On worker 2:
function g not defined on process 2
This suffices in some cases, but I need to be able to send defined functions over, as most of them are complex and defined in scripts that get included when starting julia