| 139 | |
| 140 | Y_UNIT_TEST(TestFunctionNotCopied) { |
| 141 | struct TFailOnCopy { |
| 142 | TFailOnCopy() { |
| 143 | } |
| 144 | |
| 145 | TFailOnCopy(TFailOnCopy&&) { |
| 146 | } |
| 147 | |
| 148 | TFailOnCopy(const TFailOnCopy&) { |
| 149 | UNIT_FAIL("Don't copy std::function inside TThreadPool"); |
| 150 | } |
| 151 | }; |
| 152 | |
| 153 | TThreadPool queue(TThreadPool::TParams().SetBlocking(false).SetCatching(true)); |
| 154 | queue.Start(2); |