- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for lockMap (0.05 sec)
-
cmd/namespace-lock.go
defer n.lockMapMutex.Unlock() if _, found := n.lockMap[resource]; !found { return } if readLock { n.lockMap[resource].RUnlock() } else { n.lockMap[resource].Unlock() } n.lockMap[resource].ref-- if n.lockMap[resource].ref < 0 { logger.CriticalIf(GlobalContext, errors.New("resource reference count was lower than 0")) } if n.lockMap[resource].ref == 0 {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Sep 29 22:40:36 UTC 2024 - 9.2K bytes - Viewed (0) -
cmd/local-locker_test.go
if err != nil { t.Fatal(err) } if !ok { t.Fatal("did not get write lock") } rResources[i] = arg.Resources[0] } if len(l.lockMap) != len(rResources)+len(wResources) { t.Fatalf("lockmap len, got %d, want %d + %d", len(l.lockMap), len(rResources), len(wResources)) } if len(l.lockUID) != len(rResources)+len(wResources) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Jul 24 10:24:01 UTC 2024 - 11.9K bytes - Viewed (0) -
cmd/local-locker.go
Quorum: *args.Quorum, } lri, ok := l.lockMap[resource] if ok { if reply = !isWriteLock(lri); reply { // Unless there is a write lock l.lockMap[resource] = append(l.lockMap[resource], lrInfo) l.lockUID[formatUUID(args.UID, 0)] = resource } } else { // No locks held on the given name, so claim (first) read lock l.lockMap[resource] = []lockRequesterInfo{lrInfo}
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Jul 24 10:24:01 UTC 2024 - 10.7K bytes - Viewed (0) -
cmd/lock-rest-server-common_test.go
Writer: true, UID: "89ab-cdef", Timestamp: UTCNow().UnixNano(), TimeLastRefresh: UTCNow().UnixNano(), } locker.ll.lockMap["name"] = []lockRequesterInfo{ lockRequesterInfo1, lockRequesterInfo2, } lri := locker.ll.lockMap["name"] // test unknown uid if locker.ll.removeEntry("name", dsync.LockArgs{ Owner: "owner", UID: "unknown-uid", }, &lri) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Jul 24 10:24:01 UTC 2024 - 3.2K bytes - Viewed (0) -
cmd/peer-rest-client.go
func (client *peerRESTClient) Close() error { client.restClient.Close() return nil } // GetLocks - fetch older locks for a remote node. func (client *peerRESTClient) GetLocks(ctx context.Context) (lockMap map[string][]lockRequesterInfo, err error) { resp, err := getLocksRPC.Call(ctx, client.gridConn(), grid.NewMSS()) if err != nil || resp == nil { return nil, err } return *resp, nil }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 09 16:58:30 UTC 2024 - 26.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/CycleDetectingLockFactoryTest.java
expected = assertThrows(PotentialDeadlockException.class, () -> lockA.lock()); checkMessage(expected, "LockB -> LockA", "LockA -> LockB"); // The causal chain should be cached. assertSame(firstException.getCause(), expected.getCause()); // lockA should work after lockB is released. lockB.unlock(); lockA.lock(); } // Tests transitive deadlock detection.
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 16.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/CycleDetectingLockFactoryTest.java
expected = assertThrows(PotentialDeadlockException.class, () -> lockA.lock()); checkMessage(expected, "LockB -> LockA", "LockA -> LockB"); // The causal chain should be cached. assertSame(firstException.getCause(), expected.getCause()); // lockA should work after lockB is released. lockB.unlock(); lockA.lock(); } // Tests transitive deadlock detection.
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 16.1K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/CycleDetectingLockFactory.java
* * <pre> * Thread1: acquire(LockA) --X acquire(LockB) * Thread2: acquire(LockB) --X acquire(LockA) * </pre> * * <p>Neither thread will progress because each is waiting for the other. In more complex * applications, cycles can arise from interactions among more than 2 locks: * * <pre> * Thread1: acquire(LockA) --X acquire(LockB) * Thread2: acquire(LockB) --X acquire(LockC) * ...
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Dec 15 19:31:54 UTC 2023 - 35.9K bytes - Viewed (0)