virtual void run() { CondVar childCreated; CondVar parentReady; AliveTestThreadPtr t = new AliveTestThread(childCreated, parentReady); t->start(); childCreated.waitForSignal(); test(t->isAlive()); parentReady.signal(); t->join(); test(!t->isAlive()); }
void AliveTest::run() { // // Check that calling isAlive() returns the correct result for alive and // and dead threads. // CondVar childCreated; CondVar parentReady; AliveTestThreadPtr t = new AliveTestThread(childCreated, parentReady); IceUtil::ThreadControl c = t->start(); childCreated.waitForSignal(); test(t->isAlive()); parentReady.signal(); c.join(); test(!t->isAlive()); }