C++ features by examples
Functions
Threads
C++ examples by version
»
C++17 examples
Collaboration diagram for Threads:
Functions
void
threads_17
()
Detailed Description
lambda17
threads
Function Documentation
◆
threads_17()
void threads_17
(
)
shared_lock
shared_mutex
scoped_lock
Definition at line
231
of file
17.cpp
.
232
{
233
shared_mutex m;
234
shared_lock lock(m);
235
236
mutex mt[2];
237
thread t2;
238
{
239
scoped_lock l1(mt[0], mt[1]);
240
t2 = thread([&mt]{
241
scoped_lock l2(mt[0], mt[1]);
242
});
243
}
244
t2.join();
245
246
}
Here is the caller graph for this function:
Generated by
1.9.3