Skip to content

Commit

Permalink
Remove commitLock
Browse files Browse the repository at this point in the history
  • Loading branch information
jmacd committed May 18, 2020
1 parent c2aeb72 commit a96606b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions sdk/metric/controller/push/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ const DefaultPushPeriod = 10 * time.Second
// Controller organizes a periodic push of metric data.
type Controller struct {
lock sync.Mutex
collectLock sync.Mutex
accumulator *sdk.Accumulator
resource *resource.Resource
uniq metric.MeterImpl
Expand Down Expand Up @@ -157,8 +156,8 @@ func (c *Controller) tick() {
// TODO: either remove the context argument from Export() or
// configure a timeout here?
ctx := context.Background()
c.collectLock.Lock()
defer c.collectLock.Unlock()
c.integrator.Lock()
defer c.integrator.Unlock()

c.accumulator.Collect(ctx)

Expand Down
2 changes: 1 addition & 1 deletion sdk/metric/integrator/simple/simple.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import (
type (
Integrator struct {
export.AggregationSelector
batch batch
stateful bool
batch
}

batchKey struct {
Expand Down

0 comments on commit a96606b

Please sign in to comment.