|[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]|
_______________________________________________The question is how safe is accessing and manipulating the GUI from preemptive threads?
It's not. HIToolbox is not thread-safe (with a few exceptions: posting Carbon events, using the Notification Manager).
What if you can assume that the host process is always in the background?
There's still no guarantee. The main thread could still be in HIToolbox for some other reason than user interaction.
What if I access information from a thread but always do manipulation through apple events?
There's still no guarantee when you're using multiple threads. It could happen, for example, that the main thread might be inside DisposeWindow. If you try to access information about that window from a second thread, you could crash if the Window Manager's data structures aren't in a consistent state.
|>Re: GUI and IAC and threads (From: Eric Schlegel <email@hidden>)|
Visit the Apple Store online or at retail locations.
Copyright © 2011 Apple Inc. All rights reserved.