I'm trying to kill execution of a function when it times out. Tried to leverage the post here: Julia: Can you set a time limit on eval
It errored on RemoteRef is undefined (I'm using v0.6.0). Replaced RemoteRef with Channel(1). Now the error is
MethodError: no method matching remotecall_fetch (::Int64, ::#test, ::String, ::String, ::String)
addprocs(1)
@everywhere include("test.jl")
response = Channel(1)
@async put!(response, remotecall_fetch(2, test, arg1, arg2, arg3))
start=time()
while !isready(response) && (time() - start) < timeoutDuration
sleep(0.1)
end
elapsedtime = time()-start
ERROR (unhandled task failure): MethodError: no method matching remotecall_fetch(::Int64, ::#test, ::String, ::String, ::String)
Also tried
@async put!(response, remotecall_fetch(2, ()->test(arg1, arg2, arg3)))
ERROR (unhandled task failure): MethodError: no method matching remotecall_fetch(::Int64, ::##10#12)
Is the second worker unable to find test()?