Task *task = 0;
{
MutexLock lock(queue_mutex);
- for(list<Task>::iterator i=queue.begin(); (!task && i!=queue.end()); ++i)
+ for(deque<Task>::iterator i=queue.begin(); (!task && i!=queue.end()); ++i)
if(!i->is_complete())
task = &*i;
}
#ifndef MSP_NET_RESOLVE_H_
#define MSP_NET_RESOLVE_H_
+#include <deque>
#include <string>
#include <msp/core/mutex.h>
#include <msp/core/semaphore.h>
class WorkerThread: public Thread
{
private:
- std::list<Task> queue;
+ std::deque<Task> queue;
Mutex queue_mutex;
Semaphore sem;
IO::Pipe notify_pipe;