The following code would halt
using Libtask
function f_ct()
t = 0;
while t<3
println(t)
t = 1 + t
end
return t
end
t = CTask(f_ct)
julia> consume(t) # Never returns.
0
1
2
This is likely due to the consumer task never gets waken up if the producer task exit before any produce statement. Maybe a better behaviour for this kind of tasks is to wake up the producer task with the producer task's return value?