create()
Kenneth Brody
kenbrody at spamcop.net
Tue Sep 3 10:38:19 PDT 2013
On 8/29/2013 1:00 AM, brian at aljex.com wrote:
> I have not dug into this code, I am just making a tangential remark.
>
> sleep() should be renamed voodoo()
>
> Ok in reality there are uses for sleep(), but sleeping to make sure a
> filesystem operation has completed is pure unadulterated (and
> inexcusable) voodoo.
>
> You either closed the file or you didn't. That's all there is to it. If
> you closed it, then it's ready, for anything, immediately. If you didn't
> close it, then no amount of waiting will ensure it's ready.
I think this is one of those cases where, many years ago, someone thought
they needed to let the computer "catch up", and added a sleep (or
equivalent), and then (by sheer coincidence) things "magically" started to
work, and now they simply drop in a sleep whenever they have some problem
with external programs using filePro-created data.
I do, however, recall someone saying that they had a repeatable scenario
where the sleep actually did make things "work". They did, however, agree
that if that actually did fix things, it must be some network bug that this
was working around.
--
Kenneth Brody
More information about the Filepro-list
mailing list