• 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: Threading, save panels, and segfaults
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Threading, save panels, and segfaults


  • Subject: Re: Threading, save panels, and segfaults
  • From: "R. Tony Goold" <email@hidden>
  • Date: Sat, 10 Nov 2001 17:48:00 -0500

On Saturday, November 10, 2001, at 03:48 , Charles Srstka wrote:

Argh, so this is a known bug in AppKit... that is going to discourage people from using threading! I hope this gets fixed. I have a dual processor machine, and so I rather like threading.

It isn't a bug. There's a speed penalty to be paid for re-entrant code, and the GUI would crawl if it were thread-safe. Other GUI frameworks, such as Swing, MFC, and the like aren't thread-safe either, for the same reason.

Your GUI interactions should be done from the main thread. If a secondary thread needs to make AppKit calls, it should notify the main thread (read up on Distributed Objects and Notification Centers) and let the main thread do it instead.


Cheers,
Tony


  • Follow-Ups:
    • Re: Threading, save panels, and segfaults
      • From: Andreas Monitzer <email@hidden>
References: 
 >Re: Threading, save panels, and segfaults (From: Charles Srstka <email@hidden>)

  • Prev by Date: Controlling selection in NSTextFields
  • Next by Date: Re: Threading, save panels, and segfaults
  • Previous by thread: Re: Threading, save panels, and segfaults
  • Next by thread: Re: Threading, save panels, and segfaults
  • Index(es):
    • Date
    • Thread