Skip to content

Commit

Permalink
use Go's stdlib atomics
Browse files Browse the repository at this point in the history
  • Loading branch information
schmichael committed Aug 16, 2022
1 parent 46e43a4 commit e0adc6d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ require (
github.com/vmware/govmomi v0.18.0 // indirect
github.com/yusufpapurcu/wmi v1.2.2 // indirect
go.opencensus.io v0.23.0 // indirect
go.uber.org/atomic v1.9.0
go.uber.org/atomic v1.9.0 // indirect
golang.org/x/net v0.0.0-20220802222814-0bcc04d9c69b // indirect
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 // indirect
Expand Down
6 changes: 3 additions & 3 deletions nomad/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"strconv"
"strings"
"sync"
"sync/atomic"
"time"

"github.com/armon/go-metrics"
Expand All @@ -41,7 +42,6 @@ import (
raftboltdb "github.com/hashicorp/raft-boltdb/v2"
"github.com/hashicorp/serf/serf"
"go.etcd.io/bbolt"
"go.uber.org/atomic"
)

const (
Expand Down Expand Up @@ -354,10 +354,10 @@ func NewServer(config *Config, consulCatalog consul.CatalogAPI, consulConfigEntr
nodeConns: make(map[string][]*nodeConnState),
peers: make(map[string][]*serverParts),
localPeers: make(map[raft.ServerAddress]*serverParts),
bootstrapped: atomic.NewBool(false),
bootstrapped: &atomic.Bool{},
reassertLeaderCh: make(chan chan error),
reconcileCh: make(chan serf.Member, 32),
readyForConsistentReads: atomic.NewBool(false),
readyForConsistentReads: &atomic.Bool{},
eventCh: make(chan serf.Event, 256),
evalBroker: evalBroker,
blockedEvals: NewBlockedEvals(evalBroker, logger),
Expand Down

0 comments on commit e0adc6d

Please sign in to comment.