修复清空文件索引Map时产生并发异常

This commit is contained in:
刘祥超
2023-11-23 17:14:50 +08:00
parent 2633d43897
commit c39b1c794f
2 changed files with 11 additions and 1 deletions

View File

@@ -125,6 +125,13 @@ func TestFileListHashMap_Delete(t *testing.T) {
a.IsTrue(m.Len() == 0)
}
func TestFileListHashMap_Clean(t *testing.T) {
var m = caches.NewFileListHashMap()
m.SetIsAvailable(true)
m.Clean()
m.Add("a")
}
func Benchmark_BigInt(b *testing.B) {
var hash = stringutil.Md5("123456")
b.ResetTimer()