Skip to content

Commit dcd7c26

Browse files
authored
Update fixedlist.go
1 parent 88c41bc commit dcd7c26

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fixedlist.go

+2
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ func (f *fixedList) Add(val interface{}) {
3939

4040
//获取数据长度
4141
func (f *fixedList) Len() int {
42+
f.RLock()
43+
defer f.RUnlock()
4244
return f.data.Len()
4345
}
4446

0 commit comments

Comments
 (0)