Use the same number of iterations in atomic unit test

Use reasonably, but not too, big number, so that the test doesn't run
too long, even when TSAN is used.

This also simplifies the code.
This commit is contained in:
Vadim Zeitlin
2022-05-10 23:54:21 +02:00
parent f4fb91b56e
commit 44131b044d

View File

@@ -27,13 +27,7 @@ WX_DEFINE_ARRAY_PTR(wxThread *, wxArrayThread);
// constants // constants
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// number of times to run the loops: the code takes too long to run if we use static const wxInt32 ITERATIONS_NUM = 10000;
// the bigger value with generic atomic operations implementation
#ifdef wxHAS_ATOMIC_OPS
static const wxInt32 ITERATIONS_NUM = 10000000;
#else
static const wxInt32 ITERATIONS_NUM = 1000;
#endif
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// test class // test class