Comments (3)
老版本的wait_util并不能解决这个问题,虽然可以指定使用单调时钟,但是内部还是转成了系统时钟的wait_for处理。这个情况在频繁校对时钟的环境下出现的比较频繁。知道有这么回事吧。
from cthreadpool.
你好,感谢您的的分享,gcc10之后修复了这个问题这事,我还真知道,哈哈。
之前是有了解过,故意改变系统时间会导致 wait的时间异常的情况。
但不是很确定什么情况下,会出现软件运行的时候,必须修改系统时间的情况。
比如,是人为修改,还是其他进程做出对应修改?
项目自身追求简单好用和可移植性,暂时不太想依赖boost中的内容。
from cthreadpool.
今天稍微看了一下,如果担心 系统时间调整,导致cond_var 等待时间异常的话,
可以考虑使用 cond_var.wait_util(now + 10ms) 的思路来解决这个问题。
from cthreadpool.
Related Issues (5)
- 能不能降级到C++11依赖? HOT 4
- UThreadPool.inl中commit函数线程安全问题有疑问 HOT 3
- VS2015 HOT 2
- 类继承关系的设计思路请教 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cthreadpool.