Re: Threading, save panels, and segfaults
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