LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How's My Coding?

Solved!
Go to solution

@JScherer wrote:

If not, when would one want to use a notifier?


It is typically not worth to way overthink all this. Most likely you want to expand the program in the future with more states and new functionality, so it is always better to design the code that this is easily possible. If it is important that all commands are executed, use a queue. This is highly recommended for such a state machine. With queues, you can even prioritize certain commands by enqueuing at the front.

 

Even with only one state, losses could be problematic. If you would press the button 3x very quickly, you might occasionally only get two random numbers. Only you can decide if this is acceptable

 

Designing the code to correctly work with lossy notifiers would require additional complexity to make sure that only unimportant events are discarded. In your case both were important. (It does not make sense to generate without analyzing or vice versa.).

0 Kudos
Message 11 of 11
(662 Views)