![]() |
C++ Library Extensions 2022.12.09
To help learn modern C++ programming
|
Go to the source code of this file.
Functions | |
| void | worker (const char *name, int my_turn) |
| void | example_for_synchronization () |
| int | main () |
Variables | |
| constexpr int | max_count = 12 |
| constexpr int | max_players = 3 |
| int | whose_turn = 0 |
| std::atomic< int > | count {0} |
| std::mutex | mutex |
| std::condition_variable | condition_variable |
| void example_for_synchronization | ( | ) |
Definition at line 44 of file 022-mutex.cpp.
| int main | ( | ) |
| void worker | ( | const char * | name, |
| int | my_turn | ||
| ) |
| std::condition_variable condition_variable |
Definition at line 13 of file 022-mutex.cpp.
| std::atomic<int> count {0} |
Definition at line 10 of file 022-mutex.cpp.
|
constexpr |
Definition at line 6 of file 022-mutex.cpp.
|
constexpr |
Definition at line 7 of file 022-mutex.cpp.
| std::mutex mutex |
Definition at line 12 of file 022-mutex.cpp.
| int whose_turn = 0 |
Definition at line 9 of file 022-mutex.cpp.