bricks: fix the test-suite

Fixes #446 using a fix from Étienne Renault.

* tests/core/bricks.cc: Pass the hash table by reference while
instantiating the threads.
This commit is contained in:
Alexandre Duret-Lutz 2021-03-24 10:04:38 +01:00
parent 64be4dc814
commit 535d4555e5

View file

@ -209,7 +209,7 @@ int main()
std::vector<std::thread> workers; std::vector<std::thread> workers;
for (int i = 0; i < 6; i++) for (int i = 0; i < 6; i++)
workers. workers.
push_back(std::thread([&ht2](int tid) push_back(std::thread([ht2](int tid) mutable
{ {
for (int i = 0; i< 2000; ++i) for (int i = 0; i< 2000; ++i)
ht2.insert({i, tid}); ht2.insert({i, tid});