Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/andreasfertig/programming-with-cpp20
/ DoLocked
Function
DoLocked
01.14-invocable0/main.cpp:12–17 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
10
11
template<typename T>
12
void DoLocked(T&& f)
13
{
14
std::lock_guard lck{globalOsMutex};
15
16
f();
17
}
18
19
int main()
20
{
Callers
1
main
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected