Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
tydhot committed Dec 9, 2020
2 parents d8fa8c4 + 088ceff commit ab58dd3
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion docs/Sentinel/Sentinel时间窗口的实现.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,3 @@
## 时间窗口本身的线程安全指标更新

在指标集合类的实现 MetricBucket 中,通过 LongAdder 类来记录单个指标的值而不是 AtomicLong,LongAdder 内部的核心思路是为各个线程分配一个专属变量进行更新,在需要总数的时候对这一系列进行累加,因此在更新值的时候相比 AtomicLong 会尽可能减少线程间的竞争,达到高效的 metric 更新。

0 comments on commit ab58dd3

Please sign in to comment.