| 38 | } |
| 39 | |
| 40 | inline void TestAdaptivePool() { |
| 41 | TRunAble r; |
| 42 | |
| 43 | { |
| 44 | TAdaptiveThreadPool pool; |
| 45 | |
| 46 | pool.Start(0); |
| 47 | |
| 48 | THolder<IThreadFactory::IThread> thr = pool.Run(&r); |
| 49 | |
| 50 | thr->Join(); |
| 51 | } |
| 52 | |
| 53 | UNIT_ASSERT_EQUAL(r.done, true); |
| 54 | } |
| 55 | }; |
| 56 | |
| 57 | UNIT_TEST_SUITE_REGISTRATION(TThrPoolTest); |