83 |
t.SignalStartThread(); |
t.SignalStartThread(); |
84 |
usleep(400000); // wait 400ms |
usleep(400000); // wait 400ms |
85 |
CPPUNIT_ASSERT(t.resource == 0); |
CPPUNIT_ASSERT(t.resource == 0); |
86 |
|
if (t.resource == 0) { |
87 |
|
// test is done; set condition to avoid this test suite to deadlock here |
88 |
|
t.condition.Set(true); |
89 |
|
} |
90 |
|
usleep(100000); // give thread some time (100ms) to terminate cleanly |
91 |
} |
} |
92 |
|
|
93 |
// Check if Condition class blocks until desired condition is reached |
// Check if Condition class blocks until desired condition is reached |