LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Could someone explain queues?

Could someone please dumb-down the explanation of the different types of queues? I have an exam tomorrow and I don't really understand it so any help would really be appreciated.

 

Thank you

0 Kudos
Message 1 of 4
(2,402 Views)

What is a Queue?

 

That's all you'll get out of me since you're supposed to be tested. I figured that with internet access you'd be adventurous enough to do a search to find out this information, so I'm giving you a result you would have found by doing such a a search.

Message 2 of 4
(2,399 Views)

I did search for it but I was still a little confused. I am wondering how it determines when a queue is full? What size is this? Also, what is a situation in which you would use this in a program, or why would you code it?

0 Kudos
Message 3 of 4
(2,389 Views)

The ordinary queue never gets full.  You can create a lossy queue and set a size limit on it.  Then the oldest data in the queue gets thrown away if the queue fills up faster than the data is dequeued from it.

 

Look at the examples for producer/consumer architecture, search the forums for messages with regarding queues for a better understanding of why you would use them.  Basically, if you want to pass data from one loop of your program to another to offload some of the work.  Let's say one loop does the data acquisition and you don't want to risk losing data, but you also need to do some time consuming processing on the data and also writing it out to a file, so you pass the data to loops that do those functions by way of a queue.

0 Kudos
Message 4 of 4
(2,338 Views)