Implement Set, Refactor Map into Tree

This commit is contained in:
Dynamitos
2023-12-22 19:46:07 +01:00
parent ac1d11402e
commit c8f99bb64d
20 changed files with 674 additions and 603 deletions
+2 -3
View File
@@ -8,14 +8,13 @@ TEST(ThreadPool, RunBatch)
uint32 test = 20;
std::mutex m;
List<std::function<void()>> work;
for (uint32 i = 0; i < 400; ++i)
for (uint32 i = 0; i < 40000; ++i)
{
work.add([&]() {
std::unique_lock l(m);
std::this_thread::sleep_for(std::chrono::milliseconds(10));
test++;
});
}
t.runAndWait(std::move(work));
ASSERT_EQ(test, 420);
ASSERT_EQ(test, 40020);
}