07-27-2015 12:32 AM
Another use case for Launch Actor vi which I encountered: refactoring existing code. You might want to change one parallel process to an actor without changing the entire existing code into an actor, because of complexity, testability and time constraints.
07-29-2015 09:19 AM
dsavir wrote:
Another use case for Launch Actor vi which I encountered: refactoring existing code. You might want to change one parallel process to an actor without changing the entire existing code into an actor, because of complexity, testability and time constraints.
In this case, Launch Root Actor.vi is a better choice -- that specific use case was one of the reasons that the redesign was done. You supply your new actor with the refnums to communicate out to the caller code instead of hacking it to communicate as if it had a parent actor. Trying to process message class objects when you aren't an actor is error prone and somewhat slow since it usually involves a fair amount of type testing on the message object.