Re: threads and GUI
Re: threads and GUI
- Subject: Re: threads and GUI
- From: Markus Fritze <email@hidden>
- Date: Tue, 1 Sep 2009 10:49:29 +0200
On Sep 1, 2009, at 10:35 AM, john smith wrote:
So... no matter what you think about "GUI calls should be in the GUI
thread", there are situations where you want to show some dialogs,
and the GUI thread has not even been created yet.
The "GUI thread" always exists on Mac OS X. You probably mean: the GUI
of your plugin has not been instantiated. That is a different thing.
On the other hand: showing a GUI when the host doesn't request a GUI
can be really bad, e.g. if you use the plug-in in MainStage and the
user has the preference in MainStage set to open a concert in full-
screen mode. In that case an OpenGL view will take over the whole
screen. If you open a dialog and ask the user for something, the
machine will hang.
The rule is, that you can't call the UI (any UI!) if CFRunLoopGetMain
() != CFRunLoopGetCurrent(). We have this one as an assert in front of
all code, that requires a UI, so we don't accidentally oversee a
potential problem (Mac OS X doesn't have to crash right away, but it
might at any point if you don't follow this rule)
BTW: There _are_ exceptions, but they are quite specific.
Markus
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden