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

Re: NSWindow in threads


  • Subject: Re: NSWindow in threads
  • From: Joar Wingfors <email@hidden>
  • Date: Tue, 26 May 2009 08:10:42 -0700


On 26 maj 2009, at 08.03, Mike Abdullah wrote:

Wow, I had no idea of this particular aspect of the rules. My suspicion is this exists to accomodate Cocoa's ability to use window objects for caching a view's contents to an image. Maybe the act of showing a window is what is breaking on a secondary thread.


Perhaps so. While the guidelines states that it's safe to create the window, that still leaves basically everything else in the NSWindow API off bounds for use from background threads - including calling "- orderFront:" to show the window.

The general recommendation has to be to only manipulate the UI from the main thread. With a few exceptions, the thread safety guidelines are currently not detailed enough to allow for anything else.

j o a r



_______________________________________________

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: 
 >NSWindow in threads (From: Mattias Jansson <email@hidden>)
 >Re: NSWindow in threads (From: Mike Abdullah <email@hidden>)
 >Re: NSWindow in threads (From: Joar Wingfors <email@hidden>)
 >Re: NSWindow in threads (From: Mike Abdullah <email@hidden>)

  • Prev by Date: Re: Threads and retain/release
  • Next by Date: Re: warning 'NSEvent' may not respond to '+eventWithEventRef:'
  • Previous by thread: Re: NSWindow in threads
  • Next by thread: Re: NSWindow in threads
  • Index(es):
    • Date
    • Thread