- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for lockMap (0.09 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) -
internal/dsync/dsync-server_test.go
var locksHeld int64 if locksHeld, reply = l.lockMap[args.Resources[0]]; !reply { l.lockMap[args.Resources[0]] = ReadLock // No locks held on the given name, so claim (first) read lock reply = true } else if reply = locksHeld != WriteLock; reply { // Unless there is a write lock l.lockMap[args.Resources[0]] = locksHeld + ReadLock // Grant another read lock } return reply, nil }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jan 23 16:46:37 UTC 2023 - 8.3K 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/namespace-lock_test.go
// successfully acquiring the lock. // 2) lk2 then needs to advance and remove the resource from lockMap. // 3) lk3 or lk4 (whichever didn't execute in step 1) then executes and creates // a new entry in lockMap and acquires a lock for the same resource. <-lk2ch lk3ok := <-lk3ch lk4ok := <-lk4ch if lk3ok && lk4ok {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Apr 23 18:58:53 UTC 2021 - 3.1K 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)