remove deadlock detector
This commit is contained in:
parent
74fbfe16d2
commit
a8029bc8d5
3 changed files with 6 additions and 13 deletions
5
go.mod
5
go.mod
|
|
@ -6,8 +6,3 @@ require (
|
||||||
github.com/google/uuid v1.6.0
|
github.com/google/uuid v1.6.0
|
||||||
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7
|
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
|
||||||
github.com/linkdata/deadlock v0.5.2 // indirect
|
|
||||||
github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7 // indirect
|
|
||||||
)
|
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,7 @@ import (
|
||||||
"lux/proto"
|
"lux/proto"
|
||||||
"lux/rpc"
|
"lux/rpc"
|
||||||
"net"
|
"net"
|
||||||
|
"sync"
|
||||||
"github.com/linkdata/deadlock"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type LuxRouteType int
|
type LuxRouteType int
|
||||||
|
|
@ -84,7 +83,7 @@ type LuxRouter struct {
|
||||||
|
|
||||||
routes map[proto.LuxID]*LuxRoute
|
routes map[proto.LuxID]*LuxRoute
|
||||||
|
|
||||||
channelLock deadlock.RWMutex
|
channelLock sync.RWMutex
|
||||||
outbound []LuxChannel
|
outbound []LuxChannel
|
||||||
inbound []LuxChannel
|
inbound []LuxChannel
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,9 @@ import (
|
||||||
"lux/net"
|
"lux/net"
|
||||||
"lux/proto"
|
"lux/proto"
|
||||||
"lux/rpc"
|
"lux/rpc"
|
||||||
|
"sync"
|
||||||
|
|
||||||
ipnet "net"
|
ipnet "net"
|
||||||
|
|
||||||
"github.com/linkdata/deadlock"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type LuxNode struct {
|
type LuxNode struct {
|
||||||
|
|
@ -19,10 +18,10 @@ type LuxNode struct {
|
||||||
stopChan chan bool
|
stopChan chan bool
|
||||||
|
|
||||||
neighbors map[proto.LuxID]*ipnet.UDPAddr
|
neighbors map[proto.LuxID]*ipnet.UDPAddr
|
||||||
neighborLock deadlock.RWMutex
|
neighborLock sync.RWMutex
|
||||||
|
|
||||||
state LuxNodeState
|
state LuxNodeState
|
||||||
stateLock deadlock.RWMutex
|
stateLock sync.RWMutex
|
||||||
|
|
||||||
subscribers []LuxNodeSubscriber
|
subscribers []LuxNodeSubscriber
|
||||||
|
|
||||||
|
|
@ -105,7 +104,7 @@ func (node *LuxNode) GetState() *LuxNodeState {
|
||||||
return &node.state
|
return &node.state
|
||||||
}
|
}
|
||||||
|
|
||||||
func (node *LuxNode) GetStateLock() *deadlock.RWMutex {
|
func (node *LuxNode) GetStateLock() *sync.RWMutex {
|
||||||
return &node.stateLock
|
return &node.stateLock
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue