1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Fixed race condition test failure. The secondary thread, because it does nothing but a quick printf, was terminating before the test was able to check for its existence via IRunControl.getExecutionContexts(). Consequently, it would get one less thread than expected.

This commit is contained in:
John Cortell 2010-03-04 22:14:37 +00:00
parent e585f18abd
commit ebdc876c9b

View file

@ -6,9 +6,9 @@
void *PrintHello(void *threadid)
{
int tid;
tid = (int)threadid;
int tid = (int)threadid;
printf("Hello World! It's me, thread #%d!\n", tid);
sleep(2); // keep this thread around for a bit; the tests will check for its existence while the main thread is stopped at a breakpoint
pthread_exit(NULL);
}