Is your feature request related to a problem? (你需要的功能是否与某个问题有关?)
brpc 中的很多超时和唤醒逻辑都使用了墙上时钟,在系统时钟跳变时会产生很多问题。
比如以下代码:
请求超时时间:https://github.com/apache/brpc/blob/master/src/brpc/channel.cpp#L552
条件变量等待时间:https://github.com/apache/brpc/blob/master/src/bthread/condition_variable.h#L75
sleep时间:https://github.com/apache/brpc/blob/master/src/bthread/task_group.cpp#L775
Describe the solution you'd like (描述你期望的解决方法)
切换成 monotonic clock ?
Describe alternatives you've considered (描述你想到的折衷方案)
No
Is your feature request related to a problem? (你需要的功能是否与某个问题有关?)
brpc 中的很多超时和唤醒逻辑都使用了墙上时钟,在系统时钟跳变时会产生很多问题。
比如以下代码:
请求超时时间:https://github.com/apache/brpc/blob/master/src/brpc/channel.cpp#L552
条件变量等待时间:https://github.com/apache/brpc/blob/master/src/bthread/condition_variable.h#L75
sleep时间:https://github.com/apache/brpc/blob/master/src/bthread/task_group.cpp#L775
Describe the solution you'd like (描述你期望的解决方法)
切换成 monotonic clock ?
Describe alternatives you've considered (描述你想到的折衷方案)
No