c++11 multi-threading
2023-04-07 11:30:52 12 举报
AI智能生成
c++11多线程
作者其他创作
大纲/内容
condition_variable
<b>condition_variable</b><br>only take unique_lock<mutex><br>
wait
wait_for
wait_until
notify_one
notify_all
<b>condition_variable_any</b><br>any lock<br>
cv_status
timeout
no_timeout
notify_all_at_thread_exit
mutex
mutex
lock
<b>try_lock</b><br>Lock mutex if not locked<br>
unlock
native_handle
<b>recursive_mutex</b><br>acquire multiple levels of ownership<br>
timed_mutex
try_lock_for
try_lock_until
recursive_timed_mutex
<b>lock_guard</b><br>keeping it always locked<br>until the end of its context<br>
unique_lock
lock
try_lock
try_lock_for
try_lock_until
unlock
once_flag
adopt_lock_t
defer_lock_t
try_to_lock_t
function
try_lock
lock
call_once
atomic
kill_dependency
atomic_thread_fence
atomic_signal_fence
atomic
is_lock_free
sotre
load
exchange
<b>compare_exchange_weak</b><br>true if expected compares equal to the contained value<br>
compare_exchange_strong
fetch_add
atomic_flag
test_and_set
clear
ATOMIC_FLAG_INIT<br>clear state<br>
future
promise
packaged_task
future
shared_future
future_error
future_errc
future_status
launch
async
future_category
thread
thread
get_id
joinable
join<br>调用该函数的线程必须等待该函数执行完毕
detach
swap
<b>this_thread</b><br>access the current thread<br>
get_id
yield<br>避免一个线程频繁与其他线程争抢CPU时间片<br>
sleep_untill<br>等待到一个绝对时间点
sleep_for
0 条评论
下一页