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:
parent
e585f18abd
commit
ebdc876c9b
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue