MCPcopy Create free account
hub / github.com/chen3feng/toft / TEST

Function TEST

system/threading/thread_pool_test.cpp:26–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24};
25
26TEST(ThreadPool, Closure) {
27 ThreadPool threadpool(4);
28 Foo foo;
29 for (int i = 0; i < 10; ++i) {
30 for (int j = 0; j < 20; ++j) {
31 threadpool.AddTask(NewClosure(&foo, &Foo::test1));
32 threadpool.AddTask(
33 NewClosure(
34 &foo, &Foo::test2, static_cast<intptr_t>(i*20+j)));
35 }
36 }
37}
38
39TEST(ThreadPool, Function) {
40 ThreadPool threadpool(4);

Callers

nothing calls this directly

Calls 4

NewClosureFunction · 0.85
LatencyTestFunction · 0.85
AddTaskMethod · 0.80
TerminateMethod · 0.45

Tested by

no test coverage detected