[hb-shape-threads] Fix tsan race
This commit is contained in:
parent
33c990f0a9
commit
e3d5a117a3
|
@ -161,7 +161,10 @@ static void test_backend (backend_t backend,
|
||||||
for (unsigned i = 0; i < num_threads; i++)
|
for (unsigned i = 0; i < num_threads; i++)
|
||||||
threads.push_back (std::thread (shape, variable, backend, test_input));
|
threads.push_back (std::thread (shape, variable, backend, test_input));
|
||||||
|
|
||||||
ready = true;
|
{
|
||||||
|
std::unique_lock<std::mutex> lk (cv_m);
|
||||||
|
ready = true;
|
||||||
|
}
|
||||||
cv.notify_all();
|
cv.notify_all();
|
||||||
|
|
||||||
for (unsigned i = 0; i < num_threads; i++)
|
for (unsigned i = 0; i < num_threads; i++)
|
||||||
|
|
Loading…
Reference in New Issue