Thread¶
STD C++ Thread¶
Qt QThread¶
Github¶
CMake¶
CMake | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
|
thread¶
sleep_for¶
C++ | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
|
join¶
C++ | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
|
std::this_thread::get_id()¶
C++ | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
|
typical results
Text Only | |
---|---|
1 2 |
|
example
C++ | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
|
typical results
Text Only | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
call_once¶
C++ | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
|
typical results
Text Only | |
---|---|
1 |
|
thread state¶
Text Only | |
---|---|
1 2 3 4 |
|
mutex¶
mutex¶
lock_guard¶
unique_lock¶
std::defer_lock
C++ | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
|
std::adopt_lock
C++ | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
|
atomic¶
atomic¶
compare_exchange_strong
C++ | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
|
typical results:
Text Only | |
---|---|
1 2 3 4 5 6 |
|
atomic_flag¶
condition_variable¶
wait¶
wait_for¶
wait_until¶
notify_one¶
Text Only | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
|
typical results:
Text Only | |
---|---|
1 2 3 |
|
notify_all¶
C++ | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
|
typical results:
Text Only | |
---|---|
1 2 3 4 5 |
|
future¶
future¶
C++ | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
|
typical results:
Text Only | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|