http://qs321.pair.com?node_id=11128685


in reply to Re: Semaphore puzzle
in thread Semaphore puzzle

It's all down to timing. There isn't the time to implement a lock (or a semaphore) before the other file is returned.
I've reconsidered a complete redesign based on what I've encountered here, but there are multiple other moving parts and I have to go with what I have - for the moment anyway.