Send a function to worker processes

parallel

#1

Is there an easy way to send a function that is already defined to all worker processes? E.g.:

julia> f(x) = x + 1

julia> @everywhere f = $f

#2

Check out ParallelDataTransfer.jl


#3

Sorry, but I cannot figure it out.

addprocs(2)
f(x) = 2x
sendto(workers(), f = f)
@everywhere print(f(3))

still complains that f is not defined.