Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Nested Actors not stopping

Good afternoon! Currently I am working on a project where I have a root actor launch multiple nested actors. I have noticed that when I send a shutdown to the root actor, that it does close out, but the nested actors are not shutting down. I looked into the Stop Core.vi of the AF.lvlib and it shows to read the nested actor enqueuers and send them through a for loop to an emergency stop message. However, when I highlight execution, I noticed when I call the shutdown in the root actor, it does indeed call the stop and pass the enqueuer for the nested actors to the stop. It seems only 1 of the nested actors is stopping, the others keep running. I investigated this further and took a look at the "Record Nested Actor" VI in the launch nested actor vi. I probed on the class wire coming out of that VI on exit and noticed that only 1 enqueuer was in the nested enqueuers array....shouldnt there be 1 for each nested actor that is launched by that caller? I can pass the enqueuers from the launch nested actor VI and build an array of my own in the class. Then when I shut down I specifically feed the stop to each of those Q's. That is overkill if the nested actors should be stored on the class wire of the caller? Am I missing something?

0 Kudos
Message 1 of 4
(3,515 Views)

Are you launching any of them with the auto stop flag set to False?

af auto stop.png

The nested actor won't be added to that array if F is selected when launching the nested actor.

Craig H. | CLA CTA CLED | Applications Engineer | NI Employee 2012-2023
0 Kudos
Message 2 of 4
(3,064 Views)

Craig, thanks for your response, no, I have the flag defaulted to True. However, I did miss something . I am launching multiple nested actors through a for loop.....once I put a shift register on the class wires of the for loop....VOILA! oops.....everything shuts down now....without explicitly writing the NQRs to the class and just using the auto shutdown feature.... sometimes I forget the most simple of things. FACEPALM!!!!

Message 3 of 4
(3,064 Views)

Ahh yes that would do it! Nice find

Craig H. | CLA CTA CLED | Applications Engineer | NI Employee 2012-2023
Message 4 of 4
(3,064 Views)