You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
388 B

#include "WorkerThread.hpp"
#include "Logger.hpp"
WorkerThread::WorkerThread( ThreadPool& tp )
: m_tp(tp)
{
TRACE;
}
void* WorkerThread::run()
{
TRACE;
while ( m_isRunning )
{
Task* task(0);
try {
task = m_tp.popTask();
task->run();
delete task;
} catch (CancelledException) {
LOG( Logger::FINEST, "Now I die.");
}
}
return 0;
}