Need kinda ringbuffer on filesystem

F

F. GEIGER

I've a task writing huge amounts of data into a file. I want to display them
in my wxPython GUI now. As there are really many data, loading them into mem
is not an option.

Therefore I'd like to implement something like a ringbuffer but on a file
basis: The task writes the data into the file ringbuffer and the GUI (a
virtual ListCtrl to be concrete) would read from the file ringbuffer. If the
reader is faster than the writer, it doesn't get the data. Well, it's not
exactly like a ringbuffer, because the file is allowed to grow as big as it
needs to.

It is all because reading and writing at the same time doesn't do it (reader
and writer move the file pointer of each other).

If the ringbuffer idea is not possible to implement, I could think of a
class wrapping a file and some kind of locking. A locked file would create
temp files if written to it. A reader would simply be locked out.

Any other idea?

Many thanks in advance
Franz GEIGER

P.S.: I'm on Windows.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top