I don’t think it’s println
’s nested locks causing “aa” not to be printed at all; locking would affect task printing order. It’s just your script’s primary task ending and closing the process when your @async
task yielded control midway. That’s just something you always need to account for when you run a script from the command line. I think enclosing the tasks in @sync begin ... end
would work as well as wait
, and it’s more convenient to do once over multiple tasks.
2 Likes