Skip to content

Commit

Permalink
Fix non-atomic set of logging.filterLength.
Browse files Browse the repository at this point in the history
One of its accesses was not atomic; tsan caught it.
  • Loading branch information
dsymonds committed Nov 5, 2014
1 parent 49850ea commit 5066b11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion glog.go
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ func (l *loggingT) setVState(verbosity Level, filter []modulePat, setFilter bool
// Turn verbosity off so V will not fire while we are in transition.
logging.verbosity.set(0)
// Ditto for filter length.
logging.filterLength = 0
atomic.StoreInt32(&logging.filterLength, 0)

// Set the new filters and wipe the pc->Level map if the filter has changed.
if setFilter {
Expand Down

0 comments on commit 5066b11

Please sign in to comment.