LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Queue timeout:clarification

Solved!
Go to solution
Highlighted

Hello everyone,

 

Am trying to understand better the function of the timeout, help says:

timeout in ms specifies the time, in milliseconds, that the function waits for available space in the queue if the queue is full. The default is –1, indicating never to time out.

 

--> I do not understand what it says by waits for available space? Why does it wait for that space? Which available space? And what happens if the timeout is reached? What is the usage of this timeout?

 

Very grateful for responses!

 

0 Kudos
Message 1 of 3
(228 Views)
Solution
Accepted by topic author rajiv85

When you create (obtain) a queue you can choose to give the queue a finite size.

If you have a finite size and you have filled it, trying to add more elements simply cannot work.

The code will hang here for the amount of time specified in the timeout. If a space becomes available in this timeframe, the element is added to the queue and code continues as normal.

 

If no space become savailable by the time the timeout expires, the code will continue, but the "timed out" output will be set to TRUE.

Message 2 of 3
(211 Views)

Thank you very much!! This was very clearly explained!

0 Kudos
Message 3 of 3
(170 Views)