- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for NewLRWMutex (0.17 sec)
-
internal/lsync/lrwmutex_test.go
t.Fatalf("unlock of unlocked RWMutex did not panic") } }() mu := NewLRWMutex() mu.Unlock() } // Borrowed from rwmutex_test.go func TestUnlockPanic2(t *testing.T) { defer func() { if recover() == nil { t.Fatalf("unlock of unlocked RWMutex did not panic") } }() mu := NewLRWMutex() mu.RLock() mu.Unlock() } // Borrowed from rwmutex_test.go
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Mar 05 04:57:35 UTC 2023 - 7.9K bytes - Viewed (0) -
internal/lsync/lrwmutex.go
type LRWMutex struct { id string source string isWriteLock bool ref int mu sync.Mutex // Mutex to prevent multiple simultaneous locks } // NewLRWMutex - initializes a new lsync RW mutex. func NewLRWMutex() *LRWMutex { return &LRWMutex{} } // Lock holds a write lock on lm. // // If the lock is already in use, the calling go routine // blocks until the mutex is available.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Jan 02 17:15:06 UTC 2022 - 4.8K bytes - Viewed (0) -
cmd/namespace-lock.go
resource := pathJoin(volume, path) n.lockMapMutex.Lock() nsLk, found := n.lockMap[resource] if !found { nsLk = &nsLock{ LRWMutex: lsync.NewLRWMutex(), } // Add a count to indicate that a parallel unlock doesn't clear this entry. } nsLk.ref++ n.lockMap[resource] = nsLk n.lockMapMutex.Unlock() // Locking here will block (until timeout).
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Sep 29 22:40:36 UTC 2024 - 9.2K bytes - Viewed (0)