Here's the code for the SyncQueue constructor.
The garbage pointer is only there to cleanup when the processing of the queue is done. Prevents memory leaks.Code:SyncQueue<NodeType>::SyncQueue() { Node<NodeType> *dummy = new Node<NodeType>; // Set up initial dummy node on empty queue head = dummy; tail = dummy; garbage = dummy; }
--clay