MCPcopy Create free account
hub / github.com/EricPengShuai/Interview / t3

Function t3

STL/thread.cpp:37–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35mutex m;
36
37void t3()
38{
39 while (cnt > 0) {
40 lock_guard<mutex> lockGuard(m);
41 // m.lock();
42 if (cnt > 0) {
43 --cnt;
44 cout << cnt << "\tt3" << endl;
45 }
46 // m.unlock();
47 }
48}
49
50void t4()
51{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected