Skip navigation.
 
mlNSTreeController with kqueue, too many open files ( how to handle exceeding limit on open file descriptors)
FROM : John Clayton
DATE : Fri Jun 02 22:01:51 2006

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_removed>
---------------------------------------------------------------------
CatSlapper - Manage and install multiple Tomcats

Related mailsAuthorDate
No related mails found.