Hi, I am implementing biophysical simulation software with GUI using Blink.jl and js that controls Julia part of code. I want to be able to start at stop Julia algorithm at any iteration from GUI. I considered idea about checking global stopRequest
variable at every Julia algorithm iteration. But when I try to launch test code Julia hangs.
I tried using @task
or @async
these are working with sleep(5)
, but not working when I replace sleep(5)
with while a
:
function t1()
while a
end
println("done 2")
end
a = true
t = @task t1
schedule(t) <-- hangs
a = false
a = true
@async begin #hangs
while a
end
println("done 1")
end <-- hangs
a = false
Then I tried multi-core processes, but still Julia hangs:
@everywhere function t1()
while a
end
println("done")
end
@everywhere a = true
remotecall(t1,3)
@everywhere a = false <-- hangs
Probably anybody could recommend better solution for such objective?