Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for isWriteLock (0.07 sec)

  1. internal/lsync/lrwmutex.go

    	lm.mu.Lock()
    	defer lm.mu.Unlock()
    
    	lm.id = id
    	lm.source = source
    	if isWriteLock {
    		if lm.ref == 0 && !lm.isWriteLock {
    			lm.ref = 1
    			lm.isWriteLock = true
    			locked = true
    		}
    	} else {
    		if !lm.isWriteLock {
    			lm.ref++
    			locked = true
    		}
    	}
    
    	return locked
    }
    
    const (
    	lockRetryInterval = 50 * time.Millisecond
    )
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Jan 02 17:15:06 UTC 2022
    - 4.8K bytes
    - Viewed (0)
  2. cmd/local-locker.go

    	Quorum          int    // Quorum represents the quorum required for this lock to be active.
    	idx             int    `msg:"-"` // index of the lock in the lockMap.
    }
    
    // isWriteLock returns whether the lock is a write or read lock.
    func isWriteLock(lri []lockRequesterInfo) bool {
    	return len(lri) == 1 && lri[0].Writer
    }
    
    // localLocker implements Dsync.NetLocker
    //
    //msgp:ignore localLocker
    type localLocker struct {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Jul 24 10:24:01 UTC 2024
    - 10.7K bytes
    - Viewed (0)
Back to top