|
| [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.
-eric
| References: | |
| >Re: GUI and IAC and threads (From: Eric Schlegel <email@hidden>) |
| Home | Archives | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2011 Apple Inc. All rights reserved.