Tencent / flare

Flare是广泛投产于腾讯广告后台的现代化C++开发框架,包含了基础库、RPC、各种客户端等。主要特点为易用性强、长尾延迟低。
Other
1.33k stars 200 forks source link

feat: add Barrier #87

Closed 4kangjc closed 1 year ago

4kangjc commented 1 year ago

Analogous to std::barrier

4kangjc commented 1 year ago

https://github.com/Tencent/flare/blob/6edcbfa50cf938dca65c7ceab67e62e374d5edaa/flare/base/thread/out_of_duty_callback_test.cc#L38-L47 这里三个挂掉了 x 为 3, 4, 4

0x804d8000 commented 1 year ago

看了一下,也是高负载的问题。

Merging the change. Thanks!

0x804d8000 commented 1 year ago

https://github.com/Tencent/flare/blob/6edcbfa50cf938dca65c7ceab67e62e374d5edaa/flare/base/thread/out_of_duty_callback_test.cc#L38

预期是37行足够快就执行到,所以没达到29行设置的1ms间隔。但是GitHub的ci容器估计竞争太激烈了。。

4kangjc commented 1 year ago

https://github.com/Tencent/flare/blob/6edcbfa50cf938dca65c7ceab67e62e374d5edaa/flare/base/thread/out_of_duty_callback_test.cc#L38

预期是37行足够快就执行到,所以没达到29行设置的1ms间隔。但是GitHub的ci容器估计竞争太激烈了。。

emmm懂了