• 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
NSTreeController with kqueue, too many open files ( how to handle exceeding limit on open file descriptors)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTreeController with kqueue, too many open files ( how to handle exceeding limit on open file descriptors)


  • Subject: NSTreeController with kqueue, too many open files ( how to handle exceeding limit on open file descriptors)
  • From: John Clayton <email@hidden>
  • Date: Fri, 2 Jun 2006 13:01:51 -0700

Hi,

I'm working on an app that uses NSTreeController to represent a file tree. I've been playing with kqueue to watch for changes in the underlying FS and it works very nicely, except ... you can only watch up to the max # of allowed file descriptors per process, which my system reports as 256. For a large tree, this won't cut it, even if I only watch directories. Has anyone surmounted this problem and stuck with kqueue? Am I better off polling the FS? I don't think the FNSubscribe approach works for me because I need to cooperate with some CL apps and my understanding is that this only works with GUI apps.

A thought I had was to spin out a number of kqueue watchers in separate processes and let them watch the max and send notifications back, but oh boy, I was hoping for something simpler. And I sure don't want to come close to consuming the max descriptors allowed on the entire system as a whole.

I know one other approach is to update the tree when certain app events happen, but NSTreeController seems to freak out every time I reset the content, so I'm not sure if this approach is going to work. Am I headed back to the old data source methods?

Thanks,
John



John Clayton
---------------------------------------------------------------------
http://www.fivesquaresoftware.com
email@hidden
---------------------------------------------------------------------
CatSlapper - Manage and install multiple Tomcats



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: NSTextView Drag and Drop (Colors)
  • Next by Date: Re: Newbie error
  • Previous by thread: Re: NSTextView Drag and Drop (Colors)
  • Next by thread: NSTextView doesn't remember font when unarchived from nib?
  • Index(es):
    • Date
    • Thread