• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: non-blocking file writes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: non-blocking file writes
      • From: Jeff Harrell <email@hidden>
  • Prev by Date: Re: Safari SDK
  • Next by Date: Re: Cannot declare variables in the middle anymore
  • Previous by thread: Re: non-blocking file writes
  • Next by thread: Re: non-blocking file writes
  • Index(es):
    • Date
    • Thread