src/Visualise.jl

changeset 27
51bb83c404a4
parent 26
863711a498fe
child 34
fe9ef03a91b2
--- a/src/Visualise.jl	Mon Dec 23 21:30:38 2019 +0200
+++ b/src/Visualise.jl	Mon Dec 23 21:31:48 2019 +0200
@@ -191,7 +191,8 @@
     if visualise
         rc = Channel(1)
         visproc = Threads.@spawn bg_visualise(rc)
-        vis =rc
+        bind(rc, visproc)
+        vis = rc
     else
         vis = false
         visproc = nothing
@@ -207,6 +208,7 @@
     if isa(st.vis, Channel)
         # Tell subprocess to finish, and wait
         put!(st.vis, nothing)
+        close(st.vis)
         wait(st.visproc)
     end
 end

mercurial