MCPcopy Create free account
hub / github.com/catboost/catboost / TestSimpleX1MultiThread

Method TestSimpleX1MultiThread

library/cpp/coroutine/engine/coroutine_ut.cpp:163–183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

161}
162
163void 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
185struct TTestObject {
186 int i = 0;

Callers

nothing calls this directly

Calls 4

push_backMethod · 0.45
StartMethod · 0.45
JoinMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected