| 161 | } |
| 162 | |
| 163 | void TCoroTest::TestSimpleX1MultiThread() { |
| 164 | TVector<THolder<TThread>> threads; |
| 165 | const size_t nThreads = 0; |
| 166 | std::atomic<size_t> c = 0; |
| 167 | for (size_t i = 0; i < nThreads; ++i) { |
| 168 | threads.push_back(MakeHolder<TThread>([&]() { |
| 169 | TestSimpleX1(); |
| 170 | ++c; |
| 171 | })); |
| 172 | } |
| 173 | |
| 174 | for (auto& t : threads) { |
| 175 | t->Start(); |
| 176 | } |
| 177 | |
| 178 | for (auto& t: threads) { |
| 179 | t->Join(); |
| 180 | } |
| 181 | |
| 182 | UNIT_ASSERT_EQUAL(c.load(), nThreads); |
| 183 | } |
| 184 | |
| 185 | struct TTestObject { |
| 186 | int i = 0; |