12-15-2020 11:11 AM
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)?
Greets
Martin
Solved! Go to Solution.
12-15-2020 03:05 PM
I have been trying to find @AristosQueue's post about it in Actor Framework but haven't found it yet. I'll post it when I find it.
It is a performance help. The Open Reference is the expensive part of this operation and therefore, it only has to happen once for all Actors (or in this case, all QControls). All other calls can use the same reference. It does cause one leaked reference to occur but only on the first call. In exchange, this operation is a lot faster.
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
12-16-2020 10:26 AM
12-16-2020 11:02 AM - edited 12-16-2020 11:04 AM
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.
12-21-2020 10:15 AM