优化文件缓存

This commit is contained in:
刘祥超
2021-06-13 17:37:57 +08:00
parent 993cda7766
commit 13194366a5
11 changed files with 309 additions and 101 deletions

View File

@@ -82,7 +82,7 @@ func (this *MemoryWriter) Close() error {
func (this *MemoryWriter) Discard() error {
// 需要在Locker之外
defer this.endFunc()
this.locker.Lock()
delete(this.m, this.hash)
this.locker.Unlock()