MCPcopy Create free account
hub / github.com/andreasfertig/programming-with-cpp20 / DoLocked

Function DoLocked

01.15-invocable1/main.cpp:13–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11std::mutex globalOsMutex;
12
13void DoLocked(std::invocable auto&& f)
14{
15 std::lock_guard lck{globalOsMutex};
16
17 f();
18}
19
20int main()
21{

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected