05-28-2010 10:05 AM
Hi all,
I analysed several XControls and right now I am not sure which setting of the "Preferred Execution System" is recommended. For example the Simple Dual Mode Thermometer XControl that ships with LabVIEW used same as caller. The XControl template used user interface. An deeper explanation would be nice.
Thank you in anticipation
K-Bot
06-07-2010 01:12 AM
Hi K-Bot,
If the Facade VI is set to run in the same as caller thread, which means it can execute in the thread which invoked it. If set to the UI thread, you may force a thread swap if the XControl is invoked from any other thread, which could cause an execution slowdown.
So in cases where you want to ensure your code does execute in UI thread you may want to set that explicitely.
However, if your Facade has processor intensive code that does not have to run in the UI thread, then I would set it to same as caller, since the UI thread has many other things to do.
Christian