[patch] testsuite: pthread_cond_wait.exp: Avoid a race
Joel Brobecker
brobecker@adacore.com
Tue Feb 12 17:23:00 GMT 2013
> It is just too racy. I will check in the easy workaround below, it is
> sure not a real fix.
2 seconds feels much much much too long, however. I try to avoid
these types of delays, because collectively they make a significant
dent on the overall amount of time it takes to run the testsuite.
I am trying to think of a way to rewrite the program to avoid
the delay entirely, but I don't think it's possible, because
we need to the thread to run until it blocks in pthread_cond_wait.
Can we try a smaller value? For instance, if we went from 0.01
second to 0.1 seconds, we'd increase the time by a factor of 10.
In today's CPU times, 0.1 second enough to do a huge amount of
processing, no?
--
Joel
More information about the Gdb-patches
mailing list