On 11 Dec 2006, at 20:26, Menneteau wrote:
Theodore H. Smith wrote:
Also, anyone know anything about double-buffering file streams?
So, basically, how I'd like it to work, is that ask for a read
into the buffer, and return instantly before the read is complete!
The user will process a previously made buffer. By the time he's
finished processing it, the last read will be complete. If not,
we'll actually just block until the read is complete.
Does fread offer such functionality? OR any standard Unix calls?
fread not, but read yes.
You control the read behavior with fcntl.
Basically, you can make the read asynchronous (O_NONBLOCK), you can
be notified when data is available (O_ASYNC), and you can disable
data caching (F_NOCACHE).
This should work on Unix and Mac OS. I don't know how this works
for windows.
Windows will just have to be slower ;)
Unless fcntl works for Windows too.
Mac + Unix is good enough for me :)
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>