随笔分类 -  01_C/C++ / C++新特性

摘要:关键词 std::async、std::paclaged_task、std::promise、std::future 知识点 #include <QCoreApplication> #include <thread> #include <mutex> #include <future> #inclu 阅读全文
posted @ 2023-12-01 12:32 Labant 阅读(80) 评论(1) 推荐(0) 编辑
摘要:1 //1、并发支持 2 //1.1、C++11 内存模型: 3 // a.原子性(Atomicity):对于原子类型(std::atomic),其成员函数的操作是原子的,不会被其他线程中断。 4 // b.可见性(Visibility):对于非原子类型,通过使用互斥量或同步操作来确保共享数据的可见 阅读全文
posted @ 2023-11-26 19:14 Labant 阅读(34) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示