semaphore.wait();  lock.lock(); result = queue.front(); queue.pop(); lock.unlock();  return result; };
return true; }
        inline T *pop()        {                T *result;                semaphore.wait();                lock.lock();                result = queue.front();                queue.pop();                lock.unlock();                return result;        };