The below code generates an expression consisting of multiple using 
statements

    pid = addprocs(1)[1]
    
    e1 = Expr(:toplevel)
    for (k,v) in Base.package_list
        p = basename(k)
        if endswith(p, ".jl")
            p = p[1:end-3]
        end
        push!(e1.args, Expr(:using, symbol(p)))
    end

    
While a 

remotecall(pid, eval, e1) 

works as expected, I cannot do the same with either a

    @spawnat pid e1

or

    @spawnat pid eval(e1)


Would like to understand why this is so.

Thanks,
  Amit


Reply via email to