• 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: Oh notification, where are you?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Oh notification, where are you?


  • Subject: Re: Oh notification, where are you?
  • From: James Bucanek <email@hidden>
  • Date: Wed, 23 Sep 2009 09:18:06 -0700

Michael Thon <mailto:email@hidden> wrote (Tuesday, September 22, 2009 11:20 PM +0200):
I did find the problem - my thread needs a runloop in order to process notifications. Following this fellow's blog post:
http://confuseddevelopment.blogspot.com/2006_10_01_archive.html
I added CFRunLoopRun(); after starting the metadataquery. Inside the method that gets called to process the notification I added: CFRunLoopStop(CFRunLoopGetCurrent ()); to stop the runloop.

Michael,

Just for the record, notifications don't need run loops. Notifications are delivered synchronously in the thread that posted the notifications. The exceptions are distributed notifications and notification queues.

However, the code that was generating the notification might have needed a run loop (which could explain why it was never generated), and the -performSelector:... family *definitely* needs a run loop as it queues a deferred message to a run loop's input source.

--
James Bucanek

_______________________________________________

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


References: 
 >Re: Oh notification, where are you? (From: Michael Thon <email@hidden>)

  • Prev by Date: Re: IB does not show Outlet/Action section in inspector
  • Next by Date: Re: drawing/masking one image with the alpha value from another
  • Previous by thread: Re: Oh notification, where are you?
  • Next by thread: Debugging IB 3.2 problem
  • Index(es):
    • Date
    • Thread