in my continuing quest to understand Julia tasks, i have created the 
following contrived example which does not behave as i would expect. can 
anyone help explain please? thanks in advance.

julia> function printfoobar()
         println("foo") 
         println("bar") 
         end 

printfoobar (generic function with 1 method) 

julia> printfoobar()   # great, it works
foo 
bar 

julia> println("honey"); println("wagon")   # no surprise again
honey 
wagon 

julia> t = @async (println("honey"); println("wagon"))  #  works too, 
modulo 'Task' being inbetween
honey 
Task (queued) @0x00007fb59e832500wagon 

julia> t = @async printfoobar()   # ditto:  foo and bar both printed, 
albeit with 'Task' inbetween
foo 
Task (queued) @0x00007fb59f2e1720bar 

julia> t = @async (println("honey"); printfoobar(); println("wagon"))   # 
WHERE ARE bar AND wagon ???
honey 
Task (queued) @0x00007fb59f2e1840foo 

julia> # <ENTER>  #nope, they still don't appear

julia> # <ENTER>

julia> # <ENTER>

julia> wait(t)   # nope, still no further printed output

julia> yield()   # still no joy

julia> istaskdone(t) 
true

is it that println("foo") and println("wagon") never get executed?  or that 
the output stream is just not making it to the REPL?  this is in 0.3.6 by 
the way.  similar things happen on a 0 day old master.

Reply via email to