On Jan 6, 2015, at 9:45 AM, Bernd Edlinger <bernd.edlin...@hotmail.de> wrote: > I tried your suggestion now, and it seems to work. (on a 4-way core AMD64 > laptop) > > Would you prefer this over adding a sleep in Thread1, which I posted > previously?
The problem with the patch is there is nothing in the patch that makes it work. You merely lower the odds of it failing. The point of addressing the problem, and the problem is, this test case randomly fails, is to change the test case, so that it is impossible by design for the test case to ever fail. In my version of the fix, I think it can't fail.