You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All APIs that accept timeout say the timeout should be measured in clock_realtime. However, under the hook, brpc uses futex syscall to wait for a specific time.
Describe the bug (描述bug)
All APIs that accept timeout say the timeout should be measured in clock_realtime. However, under the hook, brpc uses futex syscall to wait for a specific time.
brpc/src/bthread/sys_futex.h
Lines 38 to 42 in 4c33f88
And according to https://www.man7.org/linux/man-pages/man2/futex.2.html, futex uses clock_monotonic clock by default.
To Reproduce (复现方法)
Expected behavior (期望行为)
Use the same clock source for all timeouts. Better use clock_monotonic as it's efficient and has some degree of defense against system time jump.
Versions (各种版本)
OS:
Compiler:
brpc:
protobuf:
Additional context/screenshots (更多上下文/截图)
The text was updated successfully, but these errors were encountered: