DeathLine
DeathLine
3ks for contributing, i will review these commits later as soon as my possible.
sorry, this is a known problem, i will fix this problem later
哈哈,我之前我也发现了这个问题,但是仔细考虑了一下,似乎觉得并不需要那么严格,理由如下: 我认为这里的timeout并不是严格定义的,楼主觉得有问题,应该主要是在下面这个函数判断里: ```C++ bool peek(T& t, int timeoutMS) { while (empty()) { // 这里做了个超时判断,等待的时间不能超过即将超时的时间。 if (_cond.wait_for(_lock, std::chrono::milliseconds(timeoutMS)) == \ std::cv_status::timeout) { return false; } } t = _storage.front(); return true;...
看网上源码分析资料不多,更新了6篇源码分析博文,希望对大家有帮助。 ### 文章列表 [http://chenneal.github.io/2017/03/16/phxpaxos源码阅读之一:走马观花/](http://chenneal.github.io/2017/03/16/phxpaxos源码阅读之一:走马观花/) [http://chenneal.github.io/2017/03/18/phxpaxos源码阅读之二:粮草先行/](http://chenneal.github.io/2017/03/18/phxpaxos源码阅读之二:粮草先行/) [http://chenneal.github.io/2017/03/26/phxpaxos源码阅读之三:粉墨登场/](http://chenneal.github.io/2017/03/26/phxpaxos源码阅读之三:粉墨登场/) [http://chenneal.github.io/2017/03/30/phxpaxos源码阅读之四:各个击破/](http://chenneal.github.io/2017/03/30/phxpaxos源码阅读之四:各个击破/) [http://chenneal.github.io/2017/04/04/phxpaxos源码阅读之五:暗度陈仓/](http://chenneal.github.io/2017/04/04/phxpaxos源码阅读之五:暗度陈仓/) [http://chenneal.github.io/2017/04/05/phxpaxos源码阅读之六:完结篇/](http://chenneal.github.io/2017/04/05/phxpaxos源码阅读之六:完结篇/)