MCPcopy Create free account
hub / github.com/Extra-Creativity/Modern-Cpp-Basics / Work

Function Work

13-Multithreading/code/barrier_example.cpp:21–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19} };
20
21void Work(int i)
22{
23 for (int j = 9; ; j--)
24 {
25 results[i - 1] = i * j;
26 if (j == i)
27 break;
28 barrier.arrive_and_wait();
29 }
30 barrier.arrive_and_drop();
31}
32
33
34int main()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected