• 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: Notifications & threads
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Notifications & threads


  • Subject: Re: Notifications & threads
  • From: John Anderson <email@hidden>
  • Date: Thu, 3 Apr 2003 19:33:15 -0500

On Thursday, Apr 3, 2003, at 19:06 America/Detroit, Chris Hanson wrote:


What happens if I post a notification directly to the default notification center from within a thread other than the main thread? I assume that its observers will be notified in the same non-main thread, rather than in the main thread, correct? I also assume it doesn't matter in what thread the observers register themselves with the default notification center.

Yes, observers receive notifications via the posting thread.

Also, what happens if I enqueue a notification to a thread's default notification queue if the thread isn't the main thread? Will it be delivered to observers in that thread, or in the main thread?

I do not know, but I would imagine that if it really is the "thread's notification queue" the notification will ultimately be delivered by that thread itself. (I find the alternative ridiculous, a notification reaches the top of some thread queue so, it then signals and waits for the posting thread to come and deliver? No way.)


- John
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Notifications & threads (From: Chris Hanson <email@hidden>)

  • Prev by Date: Re: NSTask autorelease OR retain/release -> SIGBUS
  • Next by Date: Re: NSTask autorelease OR retain/release -> SIGBUS
  • Previous by thread: Notifications & threads
  • Next by thread: Server implementation questions
  • Index(es):
    • Date
    • Thread