What language? Could do with a little more information. I'm presuming C++.
A quick search of google chucks up lots of relevant pages, have a look.
Helps if you spell queueing correctly. Queuing is also acceptable. One of the longest words in English with 5 vowels in sequence. Useless fact for you there