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

Method Release

internal/utils/fs/locker.go:55–62  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

53}
54
55func (this *Locker) Release() error {
56 err := this.fp.Close()
57 if err != nil {
58 return err
59 }
60 this.fp = nil
61 return nil
62}
63
64func (this *Locker) tryLock() (ok bool, err error) {
65 err = syscall.Flock(int(this.fp.Fd()), syscall.LOCK_EX|syscall.LOCK_NB)

Callers 15

CloseMethod · 0.45
CloseMethod · 0.45
CloseMethod · 0.45
ExecContextMethod · 0.45
ExecMethod · 0.45
ReadMethod · 0.45
ReadAtMethod · 0.45
WriteMethod · 0.45
WriteAtMethod · 0.45
SyncMethod · 0.45
TruncateMethod · 0.45
CloseMethod · 0.45

Calls 1

CloseMethod · 0.65

Tested by 3

TestLimiter_AckFunction · 0.36
TestLimiter_TryAck2Function · 0.36
TestLocker_LockFunction · 0.36