MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / processClosingBFiles

Method processClosingBFiles

internal/utils/bfs/fs.go:355–370  ·  view source on GitHub ↗

处理关闭中的 BFile 们

()

Source from the content-addressed store, hash-verified

353
354// 处理关闭中的 BFile 们
355func (this *FS) processClosingBFiles() {
356 if this.isClosed {
357 return
358 }
359
360 var bFile = <-this.closingBChan
361 if bFile == nil {
362 return
363 }
364
365 _ = bFile.Close()
366
367 this.mu.Lock()
368 delete(this.closingBMap, bFile.Filename())
369 this.mu.Unlock()
370}
371
372// 弹出超出BFile数量限制的BFile
373func (this *FS) shiftOpenFiles() {

Callers 1

initMethod · 0.95

Calls 4

CloseMethod · 0.65
LockMethod · 0.45
FilenameMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected