Skip to content

Commit

Permalink
improvement from arvid
Browse files Browse the repository at this point in the history
Co-authored-by: Arvid Norberg <arvid@libtorrent.org>
  • Loading branch information
wjblanke and arvidn authored Feb 9, 2025
1 parent ed340e9 commit c255a29
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/stress_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,10 @@ void doit(int thread)

int main()
{
std::thread bunch0(doit,0);
std::thread bunch1(doit,1);
std::thread bunch2(doit,2);
std::thread bunch3(doit,3);
std::thread bunch4(doit,4);
std::thread bunch5(doit,5);
std::thread bunch6(doit,6);
std::thread bunch7(doit,7);
std::thread bunch8(doit,8);
std::vector<std::jthread> threads;
for (int i = 0; i < 10; ++i) {
threads.emplace_back(doit, i);
}
doit(9);
bunch0.join();
bunch1.join();
Expand Down

0 comments on commit c255a29

Please # to comment.