Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 211 for unlocked (0.2 sec)

  1. internal/lsync/lrwmutex.go

    			}
    			time.Sleep(time.Duration(r.Float64() * float64(lockRetryInterval)))
    		}
    	}
    }
    
    // Unlock unlocks the write lock.
    //
    // It is a run-time error if lm is not locked on entry to Unlock.
    func (lm *LRWMutex) Unlock() {
    	isWriteLock := true
    	success := lm.unlock(isWriteLock)
    	if !success {
    		panic("Trying to Unlock() while no Lock() is active")
    	}
    }
    
    // RUnlock releases a read lock held on lm.
    //
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sun Jan 02 17:15:06 GMT 2022
    - 4.8K bytes
    - Viewed (0)
  2. internal/lsync/lrwmutex_test.go

    		}
    		rl.Unlock()
    		<-wlocked
    		select {
    		case <-rlocked:
    			t.Fatal("RLocker() didn't respect the write lock")
    		default:
    		}
    		wl.Unlock()
    	}
    }
    
    // Borrowed from rwmutex_test.go
    func TestUnlockPanic(t *testing.T) {
    	defer func() {
    		if recover() == nil {
    			t.Fatalf("unlock of unlocked RWMutex did not panic")
    		}
    	}()
    	mu := NewLRWMutex()
    	mu.Unlock()
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sun Mar 05 04:57:35 GMT 2023
    - 7.9K bytes
    - Viewed (0)
  3. internal/dsync/drwmutex.go

    	// to indicate we haven't sufficiently unlocked lockers to avoid deadlocks.
    	//
    	// Caller may use this as an indication to call again.
    	return !checkFailedUnlocks(*locks, tolerance)
    }
    
    // Unlock unlocks the write lock.
    //
    // It is a run-time error if dm is not locked on entry to Unlock.
    func (dm *DRWMutex) Unlock(ctx context.Context) {
    	dm.m.Lock()
    	dm.cancelRefresh()
    	dm.m.Unlock()
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 19.7K bytes
    - Viewed (0)
  4. internal/dsync/drwmutex_test.go

    	defer func() {
    		if recover() == nil {
    			t.Fatalf("unlock of unlocked RWMutex did not panic")
    		}
    	}()
    	mu := NewDRWMutex(ds, "test")
    	mu.Unlock(context.Background())
    }
    
    // Borrowed from rwmutex_test.go
    func TestUnlockPanic2(t *testing.T) {
    	mu := NewDRWMutex(ds, "test-unlock-panic-2")
    	defer func() {
    		if recover() == nil {
    			t.Fatalf("unlock of unlocked RWMutex did not panic")
    		}
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sat Dec 24 03:49:07 GMT 2022
    - 9.7K bytes
    - Viewed (0)
  5. internal/dsync/locker.go

    	// Do read unlock for given LockArgs. It should return
    	// * a boolean to indicate success/failure of the operation
    	// * an error on failure of unlock request operation.
    	// Canceling the context will abort the remote call.
    	// In that case, the resource may or may not be unlocked.
    	RUnlock(ctx context.Context, args LockArgs) (bool, error)
    
    	// Do write unlock for given LockArgs. It should return
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Jan 18 20:44:38 GMT 2022
    - 2.7K bytes
    - Viewed (0)
  6. internal/lock/lock_test.go

    	if err != nil {
    		t.Fatal(err)
    	}
    
    	// unlock the file
    	if err = l.Close(); err != nil {
    		t.Fatal(err)
    	}
    
    	// try lock the unlocked file
    	dupl, err := LockedOpenFile(f.Name(), os.O_WRONLY|os.O_CREATE, 0o600)
    	if err != nil {
    		t.Errorf("err = %v, want %v", err, nil)
    	}
    
    	// blocking on locked file
    	locked := make(chan struct{}, 1)
    	go func() {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Sep 19 18:05:16 GMT 2022
    - 3.6K bytes
    - Viewed (0)
  7. internal/dsync/lock-args.go

    package dsync
    
    //go:generate msgp -file $GOFILE
    
    // LockArgs is minimal required values for any dsync compatible lock operation.
    type LockArgs struct {
    	// Unique ID of lock/unlock request.
    	UID string
    
    	// Resources contains single or multiple entries to be locked/unlocked.
    	Resources []string
    
    	// Source contains the line number, function and file name of the code
    	// on the client node that requested the lock.
    	Source string
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 04:34:26 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  8. internal/dsync/dsync-server_test.go

    	}
    
    	l.mutex.Lock()
    	defer l.mutex.Unlock()
    	var locksHeld int64
    	if locksHeld, reply = l.lockMap[args.Resources[0]]; !reply { // No lock is held on the given name
    		return false, fmt.Errorf("Unlock attempted on an unlocked entity: %s", args.Resources[0])
    	}
    	if reply = locksHeld == WriteLock; !reply { // Unless it is a write lock
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Jan 23 16:46:37 GMT 2023
    - 8.3K bytes
    - Viewed (0)
  9. src/main/java/jcifs/smb1/util/MD4.java

    // This file is currently unlocked (change this line if you lock the file)
    //
    // $Log: MD4.java,v $
    // Revision 1.2  1998/01/05 03:41:19  iang
    // Added references only.
    //
    // Revision 1.1.1.1  1997/11/03 22:36:56  hopwood
    // + Imported to CVS (tagged as 'start').
    //
    // Revision 0.1.0.0  1997/07/14  R. Naffah
    // + original version
    //
    // $Endlog$
    /*
     * Copyright (c) 1997 Systemics Ltd
    Java
    - Registered: Sun Apr 21 00:10:10 GMT 2024
    - Last Modified: Fri Mar 22 20:39:42 GMT 2019
    - 9.3K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/cache/CacheTesting.java

        }
        return totalSize;
      }
    
      /**
       * Peeks into the cache's internals to check its internal consistency. Verifies that each
       * segment's count matches its #elements (after cleanup), each segment is unlocked, each entry
       * contains a non-null key and value, and the eviction and expiration queues are consistent (see
       * {@link #checkEviction}, {@link #checkExpiration}).
       */
      static void checkValidState(Cache<?, ?> cache) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 16.7K bytes
    - Viewed (0)
Back to top