Hi, Yes, since Julia implements co-operative multi tasking, a process cannot respond to any other requests if it is CPU bound.
The wait functions currently do not have a timeout, though there has been some discussion on the need for the same on github. I have added a few more inter-task communication mechanisms at https://github.com/amitmurthy/MessageUtils.jl . Do check it out. On Fri, Mar 21, 2014 at 2:51 AM, Valentin Churavy <[email protected]>wrote: > So isready() seems to block if the process the RemoteRef is on is busy. > > On the REPL > > addprocs(1) > @everywhere function test() > i = 0 > while true > i += 1 > end > return i > end > > > rref = @spawn test() > > > isready(rref) # <- blocking > > What I would have expected is that it is evaluating to false (maybe after > a timeout). Adding a yield() to the while loop allows the call to go > through and properly evaluate to false. > > The reason I stumbled across the was my task management code contains the > following snippet. > > > ... > timedwait(() -> anyready(working_on), 120.0, pollint=0.5) > ... > > function anyready(working_on) > for rref in values(working_on) > if isready(rref) > return true > end > end > return isempty(working_on) > end > > But even adding the occasional yield to the computation job creates a > situation when it sometimes get stuck and sometimes it doesn't. > > Best Valentin > > > > > >
