Re: non-blocking file writes
Re: non-blocking file writes
- Subject: Re: non-blocking file writes
- From: Devon E Bowen <email@hidden>
- Date: Tue, 8 Jul 2003 09:58:46 -0400 (EDT)
>
You guys are talking as if you were doing direct I/O. Now, I'm an IRIX
>
programmer, and I'm somewhat new to this Darwin thing, but aren't
>
write() calls buffered inside the Darwin kernel?
Sure, but the kernel doesn't have infinite resources. Imagine you are
writing to a file on a disk mounted from another machine and that machine
goes down. As you are writing data, the kernel will hold it waiting for
the remote file to become available again. But it will eventually say
enough is enough. At this point, your write() call will block and your
process will be put to sleep until it clears. At this point your app
becomes unresponsive, none of the other parts of the code function, and
the spinning beach ball appears. How important this is to you depends
on whether you want your code to probably work or definitely work.
Devon
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.