• 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: threads and GUI
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • RE: threads and GUI
      • From: john smith <email@hidden>
References: 
 >Re: threads and GUI (From: tahome izwah <email@hidden>)
 >RE: threads and GUI (From: john smith <email@hidden>)
 >Re: threads and GUI (From: Markus Fritze <email@hidden>)
 >RE: threads and GUI (From: john smith <email@hidden>)
 >Re: threads and GUI (From: Jean-Daniel Dupas <email@hidden>)
 >Re: threads and GUI (From: Steven Winston <email@hidden>)
 >RE: threads and GUI (From: john smith <email@hidden>)

  • Prev by Date: RE: threads and GUI
  • Next by Date: 64-bit MIDI drivers?
  • Previous by thread: RE: threads and GUI
  • Next by thread: RE: threads and GUI
  • Index(es):
    • Date
    • Thread