摘要:
8. C++11新特性又哪些 自動類型推導auto,智能指指針(share_ptr,unique_ptr等),for循環簡化,線程相關的(std::thread/std::mutex),空指針nullptr,lambda表達式,等等 9. share_ptr是線程安全的嗎 share_ptr里包含引 閱讀全文
posted @ 2024-09-17 19:23
robot2017
閱讀(111)
評論(0)
推薦(0)
摘要:
std::condition_variable 條件變量std::condition_variable有wait和notify接口用于線程間的同步。如下圖所示,Thread 2阻塞在wait接口,Thread 1通過notify接口通知Thread 2繼續執行。 具體參見示例代碼: #include 閱讀全文
posted @ 2024-09-17 10:23
robot2017
閱讀(375)
評論(0)
推薦(2)
浙公網安備 33010602011771號