Hello,
I'm facing a strange problem . I'm running a low-priority thread that 
is waiting for a timer to tick and then makes some I/O on three 
files .
The timer ticks once every ten seconds : then the thread checks the 
difference between a local file and his remote version to see if 
there is any difference : if there is, the remote is updated; then 
the records which represent the difference are rearranged and copied 
on a second remote file (which resides on the same folder as the 
first remote file) ; last , a third file is copied on the remote 
folder.

What I notice is that the first file , and the third file, are always 
correctly updated, but the second file is almost never ever created .
I made some 200 runs of the thread and I could see that just on two 
or three occasions the third file was created and updated ... 
I don't have any I/O error on the routines I'm using for remote I/O 
(I'm using, _open(), or _sopen(), _read() , _write(), and _close() ).
In particular, the _write () routine always returns the correct 
number of records written, but as I check the folder, I always find  
just the first and the third file, and no trace of the second.
I have no doubt about the correctness of the path, since it's the 
same as the first and third and I've never changed it.
What I can say is that the second file is much bigger than the other 
two , but I can't see any reason why the file isn't updated . 
The other threads may pre-empt the file I/O one, but they just manage 
network I/O so as  I stop the applications that send data to the 
program they should stay idle, and then allow the file I/O thread to 
work . What is happening ?


Reply via email to