It can also be done with global variables. This is inelegant but simple, and that’s what I’m doing in Gaston. My understanding is that, at least for the development version of Julia, the preferred way to do this is with channels – see for instance https://github.com/JuliaLang/julia/issues/17699.