From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 1608 (from Emergency Stop)

Dug into the Actor.vi inner workings and as you suggested, regardless of my helper loops,  I can remove the Handle Error override from all but the top level actor. There's 40 VIs I don't need.

Thanks.

0 Kudos
Message 21 of 25
(1,351 Views)

BillMe wrote:

Dug into the Actor.vi inner workings and as you suggested, regardless of my helper loops,  I can remove the Handle Error override from all but the top level actor. There's 40 VIs I don't need.

Thanks.

My work here is done. 

0 Kudos
Message 22 of 25
(1,351 Views)

I use Emergency Stop to short circuit message processing ( a couple of actors can potentially have a backlog that might take a second or two to process). I disregard the 1608 in the app controller Handle Error override.

0 Kudos
Message 23 of 25
(1,351 Views)

It can be part of normal operation if you do something like:

Spawn 2 actors each searching a different database (or chunk of database) for some entry. Each of those two spawns two more, splitting their chunk in half. Those divide, repeat until you get down to a reasonable chunk size. Eventually, one of those actors finds what you're looking for and sends a result up the tree. As each higher-level actor gets the result, it sends E-Stop to its other branch to make that branch (and its nested actors) quit instantly.

There are lots of other "short circuit this operation" situations. Sending E-Stop is no different than throwing an exception in C++/JAVA/C#... sometimes it is done as an error, and sometimes it is done as a fast way to unroll a deep stack.

0 Kudos
Message 24 of 25
(1,351 Views)

The design you're asking for was in the original AF implementation that I had in 2009. Lots of feedback from users over two iterations convinced me that it was an excessive burden on the vast majority of message implementations to have the extra output. Using the error output addressed those issues. The stop signals propagating as errors helps with lots of other minor situations, but that's the main reason. So even if I redesigned AF from scratch, I'd stick with the error output.

0 Kudos
Message 25 of 25
(1,351 Views)