TG Posted August 24, 2010 Report Share Posted August 24, 2010 Hey Guys, Regarding LV 8.6.1 Can I use the Lossy Enqueue Element with a single element queue? I want to update a single element queue from one location but read it from multiple locations. Any known issues with Lossy Enqueue Element? Thanks! Quote Link to comment
Yair Posted August 24, 2010 Report Share Posted August 24, 2010 What do you mean by "read it from multiple locations"? You can certainly use a lossy enqueue on a queue with the size 1, but if you use dequeue to read the value, the queue will be empty until you put another value in it. If you simply want to have an updated value with one writer and multiple readers, you can use a global or a notifier (with the status primitive to always get the most recent value). A SEQ with lossy enqueue will also work if you always preview the queue instead of dequeuing. Quote Link to comment
TG Posted August 24, 2010 Author Report Share Posted August 24, 2010 What do you mean by "read it from multiple locations"? You can certainly use a lossy enqueue on a queue with the size 1, but if you use dequeue to read the value, the queue will be empty until you put another value in it. If you simply want to have an updated value with one writer and multiple readers, you can use a global or a notifier (with the status primitive to always get the most recent value). A SEQ with lossy enqueue will also work if you always preview the queue instead of dequeuing. Thanks Yair I forgot to say I would use the preview queue primitive. Quote Link to comment
Tim_S Posted August 24, 2010 Report Share Posted August 24, 2010 Regarding LV 8.6.1 Can I use the Lossy Enqueue Element with a single element queue? The primative should not care what the dimension of the queue is. I've used a single-element queue as an object reference in a similar manner and not had a problem. Tim Quote Link to comment
jdunham Posted August 25, 2010 Report Share Posted August 25, 2010 So why are you using SEQs for something the Notifier was designed to do? There may be some good reasons, but if we know more about your use case, you might get more useful advice. 1 Quote Link to comment
TG Posted August 26, 2010 Author Report Share Posted August 26, 2010 I don't have a good reason to not use Notifiers except preferring queues over notifiers and event structures when sharing data across VI boundries. Its not that these guys aren't wonderful creatures mind you. Im sure they are quite functional when set up correctly. I never seem to set them up correctly for sharing events and data across Vi 's. Then usually later on I get strange (to me) behavior from them. Queues give me no such problems. They always work as I expect them to, perhaps they are simpler to think about. Quote Link to comment
Aristos Queue Posted August 26, 2010 Report Share Posted August 26, 2010 yeah me too! Notifiers just don't seem to feature at all in my bag of tricks... You should know that under the hood, notifiers and queues are the same class. Notifiers always set a bounding of 1 and always use lossy enqueue. Wait For Notifier is almost identical to Preview Queue except that the Notifiers have the ability to ignore queue elements that the node has already previewed. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.