I am mentoring an FRC team and we were discussing a design where we have a couple channels of information, some of which is very high frequency and losing data is not too important, so we are using a notifier. We also have a different channel of data which is much lower frequency, but losing any would be an big problem and we are using a queue.
Now the tricky part we would like to be able to wait on data from either source (preferably not busy wait). I have come up with a a couple possibilities:
Busy wait on both, looping between checking both sources and a 0 delay in the loop to prevent starving the rest of the code. Tweak the queue based send to also push data to the high volume notifier, when I get a read on the notifier also check the queue and process it. User events? Not sure, but this looks right; however, note that the notifications/queue messages are generated in one subVI (which is called by external framework code) and being sent to another subVI which has a number of long running control loops in it.
I was hoping for something a little more elegant, that I have overlooked. Any pointers?
Thanks from an old C programmer still trying to get comfortable in labview.