| To: | REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot com> |
|---|---|
| Subject: | Re: Double-buffering read/write to files |
| From: | "Theodore H. Smith" <delete at elfdata dot com> |
| Date: | Mon, 11 Dec 2006 20:29:35 +0000 |
| Delivered-to: | listarchive at realsoftware dot com |
| Delivered-to: | realbasic-plugins at lists dot realsoftware dot com |
| Domainkey-signature: | a=rsa-sha1; q=dns; c=nofws; s=beta; d=googlemail.com; h=received:mime-version:in-reply-to:references:content-type:message-id:content-transfer-encoding:from:subject:date:to:x-mailer:sender; b=aE7eDuJiecZ6bp8xeMtm4tPjm7YoXcqqxMwYAdJXwRQ5YWvopXEVU4AjUKAgGRLRExgBQYKlyDFJilNUTB1FNLKEEp4x+Tk0cQgfhAU0TZWIVPcLZUeBPzszhuu0LGwReb/F4C/1rdtdxtBDiFPDdvKOCcUkNQLJ5hrOFxgl0yw= |
| References: | <557C772B-523C-457F-9A99-D5E7A0628387 at elfdata dot com> <60300C4A-3D6E-489F-8BAB-AC98685A9DBE at elfdata dot com> <457DBEFE dot 7060808 at Club-Internet dot fr> |
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> |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: The perl challenge: What I've learned, Theodore H. Smith |
|---|---|
| Next by Date: | Re: dylibs, function loading and getting the wrong one called, Norman Palardy |
| Previous by Thread: | Re: Double-buffering read/write to files, Menneteau |
| Next by Thread: | Re: Double-buffering read/write to files, Theodore H. Smith |
| Indexes: | [Date] [Thread] [Top] [All Lists] |