Agreed, that is perfect. It lets people know the proper order to change the read/writes. I just happened to be looking at my read circuit when I decided to change from high speed to multiple. When there is a 50-50% chance that someone chooses the right one, I'm sure there will be many people doing the same thing while learning this new feature.
I do really like the concept of these new queues. But I still think that there should be a way to flush the stream by one of these methods:
- Flush stream by someone who is not the reader or writer. (I don't expect this one, but I just added it because I thought of it. )
- Some way to mark all elements in the stream (queue) as invalid data. Kind of like you can do with an individual element. But changing that "property" for all elements in the stream.
- Being able to enqueue an element in front of the stream. This way I could tell the reader that all data in the stream is suspect (invalid) and to flush the stream with a multiple read as you suggested earlier.
I am getting around this by having two streams between my writer and reader loops. One for data and one for the message stream for when to flush the data stream. It works, but IMO it is kind of bulky and caused some issues in trying to get it to work the way I wanted. It would be easier/nicer/less spaghetti codeish if I could do that all in one stream.
And thanks for discussing this with me and taking my inputs into consideration. This is my "BEER" input for LabView. <- It's a skydiver thing if you don't know what that means...