04-03-2006 12:10 PM
04-03-2006 12:17 PM
This is not really what a queue is for (FIFO, LIFO) but you can always keep popping elements off and either caching them in an array until you get the specific element then pushing the cached element back on the queue or deque and reque elements until you find the specific element. The second method will not preserve the order however.
04-03-2006 12:39 PM
Thanks the answer!
As there would be several vi to share a common serial port, a FIFO queue is therefore used. However, I would like the user could end any vi at anytime so that i may need to dequeue a particular element in the middle.
For this purpose, is QUEUE the best choice? or semaphore? (but semaphore seems hard to control.)
Thanks
ksyz
04-03-2006 12:55 PM