Hi, I'd like the first call to return 1 and the second to return 2, but 
both return 2 !!! What could be the problem? 

function nice()
        i=1
        while true
                f() = i
                produce(f)
                i+=1
        end
end
 ye = Task(() -> nice())
funcs = Function[]
 for i in [1:2]
        push!(funcs,consume(ye))
end

println(funcs[1]())
println(funcs[2]())


Reply via email to