ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

QControl Enthusiasts

cancel
Showing results for 
Search instead for 
Did you mean: 

Question - Launch Event Handler - Asynchronous call

Solved!
Go to solution

Hy,

 

I have a question to the Launch Event Handler.vi. I saw this code (image below) in the QControl Launch Event Handler and also in the Actor Framework's Launch VI. This is a general question to improve my skills. I know what this code does and how it works but I don't fully understand the reasons behind this code.

 

The VI is non-reentrant and the shift-register stores the reference between calls. So the VI reference is only opened once between different calls.

Is this the only advantage you have over the straight-forward implementation with opening the VI reference before the Start Async Call every time. Are there other reasons too (e.g., performance)?

 

 

launchcall.png

 

Greets

Martin

0 Kudos
Message 1 of 5
(4,699 Views)
Solution
Accepted by topic author matrixx567

I have been trying to find @

 

Quentin "Q" Alldredge

Chief LabVIEW Architect, Testeract | Owner, Q Software Innovations, LLC (QSI)
Director, GCentral | Admin, LabVIEW Wiki | Creator, The QControl Toolkit
Certified LabVIEW Architect | LabVIEW Champion | NI Alliance Partner



0 Kudos
Message 2 of 5
(4,674 Views)

Thank you for the answer. This was also my first guess.

 

Greets

Martin

Message 3 of 5
(4,652 Views)
Solution
Accepted by topic author matrixx567

If you look in the AF launch code, there is a comment and a link to the relevant conversation.  It's for reasons of performance AND to avoid being blocked by "Root Loop", which is the problem that certain things, including the User having a menu open, block opening a reference for an async call.

Message 4 of 5
(4,644 Views)

Hy,

 

I also found an interesting blog article about the Root Loop.

Message 5 of 5
(4,589 Views)