09-13-2013 04:08 AM
Hi,
I am trying to execute two instances of the same VI (with separate sequence contexts) in two separate threads. These two instances are called from two separate sequences, using a new thread for each sequence. The problem is that the instance of the VI called from the second sequence does not execute until the first one has stopped. I need some help in making them execute in parallel, they shouldn't be waiting for each other to finish.
Thank you,
Chris
Solved! Go to Solution.
09-13-2013 04:11 AM
Chris,
the VI itself is executed by the LV runtime engine. Hence, if the VI is non-reentrant, it will block all calls, regardless of the calling threads, if it is already executing.
Depending on the content of that VI, the most obvious solution is to set the VI "reentrant".
Norbert
09-13-2013 04:23 AM
Awesome! Problem solved, thank you!
09-13-2013 05:53 AM
Hi, although the reentrant setting fixed the issue, the VI's are no longer exiting. My sequence executes successfully up to the end, and then just sits there waiting for the VI's to exit.
I was able to stop them successfully before making them reentrant. Do reentrant VI's require alternative methods for stopping them?
Thanks, Chris
09-13-2013 09:39 AM
Chris,
depending on the way how you stop them, it might be necessary to change that.
As you have a bunch of individual clones running, you have to stop each clone individually.
Norbert