| 24 | }; |
| 25 | |
| 26 | TEST(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 | |
| 39 | TEST(ThreadPool, Function) { |
| 40 | ThreadPool threadpool(4); |
nothing calls this directly
no test coverage detected