forhappy / cplusplus-concurrency-in-practice Goto Github PK
View Code? Open in Web Editor NEWA Detailed Cplusplus Concurrency Tutorial 《C++ 并发编程指南》
License: MIT License
A Detailed Cplusplus Concurrency Tutorial 《C++ 并发编程指南》
License: MIT License
Hi, 我大概看了一下内存模型部分,整体来说写得不错,精神可佳,貌似你大多数部分是翻译的那本concurrency in action?有个地方貌似不太准确,请你参考。
例如,如果两个变量读写互不相关,编译器有可能将读操作提前(暂且称为预读prefetch 吧),或者尽可能延迟写操作,假设如下面的代码段:....
首先这里不能称为预读,这里编译器的优化其实是instruction reorder,是为了充分利用cpu的流水线结构,而将读写不相关的操作放到一起,这样cpu在等待一个数据从内存读过来(数千cpu周期)的时候,同时还能干别的,而不是干等着。预读是硬件的,和编译器没有太大关系。
其次,下面的这个例子。。。请问你是不是没有亲自编译看看?按照你写的这种reorder,结果都变了,这不可能的。。。
在“与 C++11 多线程相关的头文件”那一段feture的头文件写掉了
参考Kfifo模型 实现无锁单生单消是否可行
是否有考虑一下 gitbook ?
直接在 github 上阅读不方便吧?
Ff
Is this repo still alive?
这本书也不错
there are so many pull requests, please deal with them , tks!
这里有问题呀!
怎么还有boost?!
std::recursive_mutex::scoped_lock scoped_lock(mutex);
这个是C++17的标准吧?!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.