• 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
FSEventStream advice
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: FSEventStream advice
      • From: Jerry Krinock <email@hidden>
  • Prev by Date: Re: NSOperationQueue
  • Next by Date: Localization based on location
  • Previous by thread: Re: adding space for 'annotations' with a typesetter subclass
  • Next by thread: Re: FSEventStream advice
  • Index(es):
    • Date
    • Thread