# HG changeset patch # User Tuomo Valkonen # Date 1577129508 -7200 # Node ID 51bb83c404a4a7ff8677b04e7b1da25dc7d0bf24 # Parent 863711a498fe29c96d71381af833d9ecb3930695 bind, close diff -r 863711a498fe -r 51bb83c404a4 src/Visualise.jl --- 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