MCPcopy Create free account
hub / github.com/aseprite/laf / TEST

Function TEST

base/task_tests.cpp:14–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12using namespace base;
13
14TEST(Task, Basic)
15{
16 std::vector<task> tasks(100);
17 std::atomic<int> c(0);
18 thread_pool p(10);
19 for (task& t : tasks) {
20 t.on_execute([&c](task_token&) { ++c; });
21 t.start(p);
22 }
23 p.wait_all();
24 EXPECT_EQ(100, c);
25}
26
27TEST(Task, MultiplePools)
28{

Callers

nothing calls this directly

Calls 2

on_executeMethod · 0.80
wait_allMethod · 0.80

Tested by

no test coverage detected