Jump to content

Lossy Enqueue Element


TG

Recommended Posts

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!

Link to comment

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.

Link to comment

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.

Link to comment

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

Link to comment

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.

Link to comment

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.
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.