Ejemplo n.º 1
0
 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());
 }
Ejemplo n.º 2
0
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());
}