On Mon, Sep 27, 2010 at 01:48:14AM -0700, Eric Platon wrote:
>
> The reserved wfid cases in your first post (http://gist.github.com/
> 597086) surprised me a bit (are there really reserved ids in Ruote?),
> and it seems there is also a risk for infinite looping with the second
> return statement. The code is gone anyway, and the latest version
> worked fine in a couple of tests.
Hello Eric,
yes, this was convoluted and the solution was one good night of sleep.
> About your second test case, is there any concrete reason to sleep for
> 0.4s ?
It's just to give some breathing time to the engine, with fast storages this is
too much, but with a storage like ruote-couch or if you're encoding mkvs in the
background, it might be necessary. Since I run the tests with all the storages,
I go for a safe value.
Speaking of things occuring at different paces, I think there might still be an
issue in the current implementation : what happens if engine A just launched
wfid0, and engine B stumbles on
return wfid if wfid && process(wfid) != nil
# process is already running
?
wfid0 is encountered, but process(wfid0) returns nil (for now).
I will probably expand that to something like
if wfid
sleep 0.400
return wfid if process(wfid)
end
or
2.times { |i| sleep(i * 0.350); return wfid if process(wfid) } if wfid
but well... Still the risk is here.
Best regards,
--
John Mettraux - http://jmettraux.wordpress.com
--
you received this message because you are subscribed to the "ruote users" group.
to post : send email to [email protected]
to unsubscribe : send email to [email protected]
more options : http://groups.google.com/group/openwferu-users?hl=en