[AGENT++] Agentpp::QueuedThreadPool does not executes its queue entries

Claus Klein claus.klein at arcormail.de
Fri Sep 8 21:01:52 CEST 2017


Hi Frank,

I’m sorry to bother you again, but I have found an additional problem within threads.cpp:

void QueuedThreadPool::run()
{
    go = TRUE;
    Thread::lock();
    while (go) {
        Runnable* t = queue.removeFirst();
        if (t) {
            assign(t);
        }
        Thread::wait(1000);
    }
    Thread::unlock();
}

void QueuedThreadPool::idle_notification()
{
    Thread::lock();
    Thread::notify();	//###XXX### why is this called? CK
    Thread::unlock();
    ThreadPool::idle_notification();
}

The run() method is never called, so every queued task is never executed.

I send you my test program too.

P.S. Do you have unit tests for agentpp?

Best regards
Claus



More information about the AGENTPP mailing list