Hi All,
I would like to implement an asynchronous reading from file.
I am doing stochastic gradient descend and while I am doing the
optimisation, I would like to load the data on the background. Since
reading of the data is followed by a quite complicated parsing, it is not
just simple IO operation that can be done without CPU cycles.
the skeleton of my current implementation looks like this
rr = RemoteChannel()
@async put!(rr, remotecall_fetch(loaddata,2)
for ii in 1:maxiter
#do some steps of the gradient descend
#check if the data are ready and schedule next reading
if isready(rr)
append!(dss[1],take!(rr));
@async put!(rr, remotecall_fetch(loaddata,2)
end
end
nevertheless the isready(rr) always returns false, which looks like that
the data are never loaded.
I start the julia as julia -p 2, therefore I expect there will be a
processor.
Can anyone explain me please, what am I doing wrong?
Thank you very much.
Tomas