FSEventStream advice
FSEventStream advice
- Subject: FSEventStream advice
- From: Graham Cox <email@hidden>
- Date: Mon, 04 Jun 2012 09:13:39 +1000
I've traced the source of my memory corruption (cf) to a piece of 3rd party code that monitors for directory changes using kqueue(). This hasn't given any trouble for years, but now I'm making a lot of hardworking threads the bug is making itself known.
I'm going to see if it's something obvious, but given how subtle and difficult this one has proved to be to track down (doesn't show up when running with the debugger), I'm also considering replacing it with something new based on FSEvents.
The only small issue I see with that right now is that you have to specify the list of directories "up front" and there isn't a way to change them while the FSEvent stream is running. As the user uses my app, the directories to be monitored will need to change, so I'm wondering what best practice is:
a). stop the stream and schedule a new one with the new list of paths,
b). create a separate stream for each directory I'm interested in.
I'm guessing that a) would be more efficient, but b) is going to be more convenient.
Any advice?
--Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden