• 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: Worker threads and UI threads
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Worker threads and UI threads


  • Subject: Re: Worker threads and UI threads
  • From: Nathan Day <email@hidden>
  • Date: Fri, 7 Jun 2002 22:37:53 +0930

On my iTools home page there is an example you can look at even use.
http://homepage.mac.com/nathan_day/

On Friday, June 7, 2002, at 12:33 PM, Chris DeSalvo wrote:

My attempts to have a worker thread send updates to the main application
thread are still failing. Although the messages are getting sent (via
NSNotificationCenter) the receiver is always executing in the worker
thread's context. As such, all the UI code I'm calling is dying.

I tried replacing all of my uses of NSNotificationCenter with
NSDistributedNotificationCenter, and this did in fact get thing executing in
the right context. However, only the first message ever made it through and
I never got any more, even though I could see them being posted.

I then tried created my own private NSNotificationQueue and attaching it to
the NSNotificationCenter of the main thread and having my worker thread post
updates through that. No notifications ever came through at all.

Does anyone know of some working sample code that has a working thread
posting messages to the main app thread so that the main thread can update
UI?
_______________________________________________
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: 
 >Worker threads and UI threads (From: Chris DeSalvo <email@hidden>)

  • Prev by Date: HTML special characters
  • Next by Date: About the accessibility stuff...
  • Previous by thread: Re: Worker threads and UI threads
  • Next by thread: Re: Worker threads and UI threads
  • Index(es):
    • Date
    • Thread