Skip to content

Commit

Permalink
locks
Browse files Browse the repository at this point in the history
  • Loading branch information
pdoerner committed May 24, 2023
1 parent db4db37 commit c256fb1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 0 additions & 3 deletions common/aggregate/moving_window_average.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,6 @@ func (a *MovingWindowAvgImpl) Average() float64 {
}

func (a *MovingWindowAvgImpl) expireOldValuesLocked() {
a.Lock()
defer a.Unlock()

for ; a.head != a.tail; a.head = a.head.Next() {
data, ok := a.head.Value.(timestampedData)
if !ok || time.Since(data.timestamp) < a.windowSize {
Expand Down
1 change: 1 addition & 0 deletions common/aggregate/moving_window_average_array.go
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package aggregate

0 comments on commit c256fb1

Please sign in to comment.