Hi James,
thank for the reply. Though in your implementation the reading is not in a 
separate process / thread, as I expect that you are bound to IO operations. 
In my problem there is computationally intensive post-processing. Should I 
modify the iotask as

iotask = @task begin
    info("reading from stdin")
    for i in 1:20
        s @spawn loaddata()
        produce(s)
    end
end

Do I need to have the consumer of s wrapped as another task? Meaning my 
stochastic gradient descend loop will look like your worked and does the 
stochastic gradient descend needs to produce something? I would like to 
understand the details.

Thanks for the answer.

Tomas

Reply via email to