Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

The "Launch Actor" vi

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.

"Wisdom comes from experience. Experience is often a result of lack of wisdom.”
― Terry Pratchett
0 Kudos
Message 21 of 22
(751 Views)

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.

0 Kudos
Message 22 of 22
(751 Views)