Quantcast
Channel: Xojo Programming Forum - Latest topics
Viewing all articles
Browse latest Browse all 3773

Best way to read/write potentially busy files

$
0
0

I have various apps which read and write small data files. Typically these are an app which interfaces to a sensor and generates results every 10 seconds or so. I delete the existing file and write a new one. Another one then reads these results, say every 10 seconds or so.

Clearly there is the possibility of conflict between these.

At the moment I put the read, write or delete in a Try/Catch structure, where the Catch should wait a short time before trying again.

What is the best way to do this ? I’ve tried doEvents (not recommended I know) and App.SleepCurrentThread, but that seems to not be allowed in a Timer (I get a compiler error for that).

Thanks,
Richard

6 posts - 4 participants

Read full topic


Viewing all articles
Browse latest Browse all 3773

Trending Articles