Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for lockUID (0.06 sec)

  1. cmd/local-locker_test.go

    	}
    	if len(l.lockUID) != len(rResources)+len(wResources) {
    		t.Fatalf("lockUID len, got %d, want %d + %d", len(l.lockUID), len(rResources), len(wResources))
    	}
    
    	// Expire a minute ago.
    	l.expireOldLocks(-time.Minute)
    	if len(l.lockMap) != 0 {
    		t.Fatalf("after cleanup should be empty, got %d", len(l.lockMap))
    	}
    	if len(l.lockUID) != 0 {
    		t.Fatalf("lockUID len, got %d, want %d", len(l.lockUID), 0)
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Jul 24 10:24:01 UTC 2024
    - 11.9K bytes
    - Viewed (0)
  2. cmd/local-locker.go

    							mapID := formatUUID(uid, idx)
    							if _, ok := l.lockUID[mapID]; !ok {
    								break
    							}
    							delete(l.lockUID, mapID)
    						}
    						continue
    					}
    					l.removeEntry(resource, dsync.LockArgs{UID: uid}, &lris)
    				}
    			}
    			return true, nil
    		}
    
    		idx := 0
    		for {
    			mapID := formatUUID(args.UID, idx)
    			resource, ok := l.lockUID[mapID]
    			if !ok {
    				return idx > 0, nil
    			}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Jul 24 10:24:01 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  3. internal/dsync/drwmutex.go

    	lockRetryMinInterval time.Duration
    }
    
    // Granted - represents a structure of a granted lock.
    type Granted struct {
    	index   int
    	lockUID string // Locked if set with UID string, unlocked if empty
    }
    
    func (g *Granted) isLocked() bool {
    	return isLocked(g.lockUID)
    }
    
    func isLocked(uid string) bool {
    	return len(uid) > 0
    }
    
    // NewDRWMutex - initializes a new dsync RW mutex.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 09 15:49:49 UTC 2024
    - 20.4K bytes
    - Viewed (0)
Back to top