Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Deadlock when launching Actors from Pre-Launch Init.vi

In AF 3.0, I found a deadlock today when I tried to launch two actors from the Pre-Launch Init VI of their "owning" actor. When I moved the calls to Launch Actor.vi into Owner:Actor Core.vi, the deadlock disappeared. Closer inspection showed me an apparent race condition: Launch Actor.vi calls Actor.vi, then waits infinitely for a response message. Actor.vi has to finish executing Pre-Launch Init.vi before it can send that message, though. So when I recursively called Launch Actor.vi from inside Pre-Launch Init.vi, I created a lockout.

Will this behave differently in AF 2012? If not, do we just have to launch owned actors from a message VI or Actor Core.vi?

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

My understanding is that this is the 2012 behavior as well.  Pre-Launch Init cannot call Launch Actor, and I don't think that's going to change.  Launch your nested actors from Actor Core.vi.

0 Kudos
Message 2 of 3
(3,292 Views)

Pre-Launch Init is explicitly documented as a place where you cannot launch nested actors. It is intended behavior -- Pre-Launch Init is intended to be a bottleneck to safely acquire additional resources wherein no other actor could possibly be launching. Nested Actors should be launched in Actor Core.vi.

0 Kudos
Message 3 of 3
(3,292 Views)