Giter VIP home page Giter VIP logo

Comments (3)

aijle avatar aijle commented on May 15, 2024 1

老版本的wait_util并不能解决这个问题,虽然可以指定使用单调时钟,但是内部还是转成了系统时钟的wait_for处理。这个情况在频繁校对时钟的环境下出现的比较频繁。知道有这么回事吧。

from cthreadpool.

ChunelFeng avatar ChunelFeng commented on May 15, 2024

你好,感谢您的的分享,gcc10之后修复了这个问题这事,我还真知道,哈哈。

之前是有了解过,故意改变系统时间会导致 wait的时间异常的情况。
但不是很确定什么情况下,会出现软件运行的时候,必须修改系统时间的情况。
比如,是人为修改,还是其他进程做出对应修改?

项目自身追求简单好用和可移植性,暂时不太想依赖boost中的内容。

from cthreadpool.

ChunelFeng avatar ChunelFeng commented on May 15, 2024

今天稍微看了一下,如果担心 系统时间调整,导致cond_var 等待时间异常的话,
可以考虑使用 cond_var.wait_util(now + 10ms) 的思路来解决这个问题。

from cthreadpool.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.