10-17-2019 02:03 PM
@crossrulz wrote:
...native Dequeue on it. No public functions would expose the native queue ref.Let's be honest. A queue should only have 1 dequeuer: the owner of the queue. I am a fan of the private Action Engine with wrapper "command" VIs so other libraries can send commands/data to my consumer. So my actors end up looking something like this:
...
I would agree with all of that except the "Should".
How about...
In most cases a queue should only have 1 dequeuer
I have had situation were I needed things to get done in parallel and I did not care which of many widgets did the work as long as it got done.
In that case, I have used a single queue with multiple widgets reading from it and which ever one grabbed an element from a queue took care of that something.
Yes, just splitting hairs...
Ben
10-17-2019 02:29 PM
@Ben wrote:I would agree with all of that except the "Should".
How about...
That's why I didn't say "shall". There is also the example of the Single Element Queue (which nobody should be using anymore since Data Value References do the same job, but better). Yes, I know, splitting hairs...
10-17-2019 03:43 PM
Looking back at this, I think part of the problem was the way the states are structured. Taking a look at Steve Watt's presentation on state machine best practices would help eliminate the core issue.