mirror of
https://github.com/gonum/gonum.git
synced 2025-10-09 17:10:16 +08:00
Maded the ID atomic
This commit is contained in:
2
set.go
2
set.go
@@ -26,7 +26,7 @@ func NewSet() Set {
|
|||||||
defer func() { atomic.AddUint64(&globalid, 1) }()
|
defer func() { atomic.AddUint64(&globalid, 1) }()
|
||||||
return Set{
|
return Set{
|
||||||
data: make(map[interface{}]struct{}, 0),
|
data: make(map[interface{}]struct{}, 0),
|
||||||
id: globalid,
|
id: atomic.LoadUint64(&globalid),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user