06-11-2012 04:30 PM
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?
06-11-2012 05:01 PM
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.
06-12-2012 05:42 AM
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.