void Stop()
Cancels any scheduled lookups and joins the lookup thread.
std::atomic< bool > m_ShouldTerminate
The overriden Execute() method should check this value periodically and terminate if this is true...
void Clear(void)
Removes all Items from the Queue, calling Delete on each of them.
void EnqueueItem(ItemType a_Item)
Enqueues an item to the queue, may block if other threads are accessing the queue.
void ScheduleLookup(std::function< void()> a_Lookup)
Schedule a lookup task for execution.
ItemType DequeueItem(void)
Dequeues an item from the queue, blocking until an item is available.
virtual void Execute() overridefinal
Process the queue until the thread is stopped.
virtual ~cNetworkLookup() override
cQueue< std::function< void()> > m_WorkQueue
The queue of lookup tasks waiting to be executed.
void Stop(void)
Signals the thread to terminate and waits until it's finished.