I am creating an sample of a communication server through LabVIEW.
In the main VI I have a server and clients: Execution of the last is set as preallocated clone reentrant. I use Queued Message Handler to transfer messages and commands between server and clients.
The picture below is the client VI (preallocated clone reentrant execution) with highlighted Queued Message SubVIs. In my previous question I asked about execution type of SubVIs in the Client VIs (preallocated) and got answer that SubVIs need to be preallocated too. But now my question is about Queued Message handler template VIs. Should I set execution type of Queued Message handler template VIs the same as for parent VI?
Thank you
The Queued Message Handler VIs seem to me to have appropriate reentrancy settings out of the box.
For example
Enqueue Message
, which should always execute quickly, is non-reentrant butDequeue Message
, which waits for a message if there isn't one already in the queue, is preallocated clone reentrant.It's good that you're thinking about this, as timing bugs can be a lot harder to trace than simple data-value bugs, but for most purposes I think you can trust the designers of the framework to have chosen correctly.
If you're really not satisfied by this and are still worried that an incorrect reentrancy setting might be causing you trouble, it won't really hurt to change all these VIs to preallocated clone reentrant. Unless you are using these VIs to pass some huge data structure around, the extra memory consumed by the preallocated clones should be small.