LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

need to take the N-th element from a queue

The usual way to make something "high priority" is to put it on the beginning of the Queue instead of on the end.  This forces it to be the next thing that is dequeued, a "Do This First!!" instruction.  That's the purpose of Enqueue Element at Opposite End.  Some of the banter between natasftw and me was about using this function, which I called "Push", as this turns the Queue (a First In, First Out structure) into a Stack (a Last In, First Out structure).  Of course, if you "mix metaphors" by putting high priority items at the front of the Queue, it becomes "something else", namely a "Queue with a High Priority Input" ...

 

Bob Schor

 

 

0 Kudos
Message 11 of 12
(627 Views)

I fell like I am offering and rope that can be used to hang yourselves ....

 

Wrap-up the assorted queue opeartions in an

Spoiler
(wait for it)

Action Engine!

 

 

As long as all of the operations are done inside the AE you can prevent other loops from inserting while you are abusing the queue.

 

Spoiler
Abuse - THe beuty of the queue is can operate in-place. THe destroy delete re-queue defiles that beuteous function.

 

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 12 of 12
(603 Views)