名稱空間
變體
操作

cnd_broadcast

來自 cppreference.com
< c‎ | thread
在標頭檔案 <threads.h> 中定義
int cnd_broadcast( cnd_t *cond );
(C11 起)

解除在呼叫時阻塞在條件變數 cond 上的所有執行緒的阻塞。如果沒有執行緒阻塞在 cond 上,該函式不執行任何操作並返回 thrd_success

目錄

[編輯] 引數

cond - 指向條件變數的指標

[編輯] 返回值

如果成功則為 thrd_success,否則為 thrd_error

[編輯] 參考

  • C17 標準 (ISO/IEC 9899:2018)
  • 7.26.3.1 cnd_broadcast 函式 (p: 275-276)
  • C11 標準 (ISO/IEC 9899:2011)
  • 7.26.3.1 cnd_broadcast 函式 (p: 378)

[編輯] 參見

解除阻塞在條件變數上阻塞的一個執行緒
(函式) [編輯]
C++ 文件,關於 condition_variable::notify_all
C++ 文件,關於 condition_variable_any::notify_all