Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 928 for lock1 (0.04 sec)

  1. android/guava-tests/test/com/google/common/util/concurrent/CycleDetectingLockFactoryTest.java

        checkMessage(expected, "LockC -> LockA", "LockB -> LockC", "LockA -> LockB");
      }
    
      public void testReentrancy_noDeadlock() {
        lockA.lock();
        lockB.lock();
        lockA.lock(); // Should not assert on lockB -> reentrant(lockA)
      }
    
      public void testExplicitOrdering_noViolations() {
        lock1.lock();
        lock3.lock();
        lock3.unlock();
        lock2.lock();
        lock3.lock();
      }
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 16.1K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/CycleDetectingLockFactoryTest.java

        checkMessage(expected, "LockC -> LockA", "LockB -> LockC", "LockA -> LockB");
      }
    
      public void testReentrancy_noDeadlock() {
        lockA.lock();
        lockB.lock();
        lockA.lock(); // Should not assert on lockB -> reentrant(lockA)
      }
    
      public void testExplicitOrdering_noViolations() {
        lock1.lock();
        lock3.lock();
        lock3.unlock();
        lock2.lock();
        lock3.lock();
      }
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 16.1K bytes
    - Viewed (0)
  3. platforms/core-runtime/base-services/src/test/groovy/org/gradle/internal/resources/DefaultResourceLockCoordinationServiceTest.groovy

            then:
            !lock1.lockedState
            !lock2.lockedState
        }
    
        def "can lock resources atomically with tryLock"() {
            def lock1 = resourceLock("lock1", lock1Locked)
            def lock2 = resourceLock("lock1", lock2Locked)
    
            when:
            def disposition = null
            coordinationService.withStateLock(new InternalTransformer<ResourceLockState.Disposition, ResourceLockState>() {
                @Override
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 11 17:16:10 UTC 2024
    - 15.4K bytes
    - Viewed (0)
  4. platforms/core-runtime/base-services/src/test/groovy/org/gradle/internal/work/DefaultWorkerLeaseServiceTest.groovy

            when:
            workerLeaseService.withLocks([lock1, lock2]) {
                assert lock1.lockedState
                assert lock2.lockedState
                workerLeaseService.withoutLocks([lock1, lock2], runnable {
                    assert !lock1.lockedState
                    assert !lock2.lockedState
                    assert !lock1.doIsLockedByCurrentThread()
                    assert !lock2.doIsLockedByCurrentThread()
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Apr 05 16:29:26 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  5. platforms/core-execution/persistent-cache/src/test/groovy/org/gradle/cache/internal/DefaultFileLockManagerContentionTest.groovy

        }
    
        def "lock manager is notified while holding an exclusive lock when another lock manager in same process requires lock with mode #lockMode"() {
            given:
            def file = tmpDir.file("lock-file.bin")
            def action = Mock(Consumer)
    
            def lock = createLock(Exclusive, file, manager, action)
    
            when:
            def lock2 = createLock(lockMode, file, manager2)
    
            then:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 16 15:49:51 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  6. src/runtime/metrics_test.go

    // to abstract over the relationship of two Lock calls or an RLock
    // and a Lock call.
    type locker2 interface {
    	Lock1()
    	Unlock1()
    	Lock2()
    	Unlock2()
    }
    
    type mutex struct {
    	mu sync.Mutex
    }
    
    func (m *mutex) Lock1()   { m.mu.Lock() }
    func (m *mutex) Unlock1() { m.mu.Unlock() }
    func (m *mutex) Lock2()   { m.mu.Lock() }
    func (m *mutex) Unlock2() { m.mu.Unlock() }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:52:17 UTC 2024
    - 45K bytes
    - Viewed (0)
  7. guava/src/com/google/common/util/concurrent/CycleDetectingLockFactory.java

       *
       * Lock lockA = factory1.newReentrantLock(MyLockOrder.FIRST);
       * Lock lockB = factory1.newReentrantLock(MyLockOrder.FIRST);
       * Lock lockC = factory2.newReentrantLock(MyLockOrder.FIRST);
       *
       * lockA.lock();
       *
       * lockB.lock();  // will throw an IllegalStateException
       * lockC.lock();  // will throw an IllegalStateException
       *
       * lockA.lock();  // reentrant acquisition is okay
       * }</pre>
       *
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri Dec 15 19:31:54 UTC 2023
    - 35.9K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/util/concurrent/CycleDetectingLockFactory.java

       *
       * Lock lockA = factory1.newReentrantLock(MyLockOrder.FIRST);
       * Lock lockB = factory1.newReentrantLock(MyLockOrder.FIRST);
       * Lock lockC = factory2.newReentrantLock(MyLockOrder.FIRST);
       *
       * lockA.lock();
       *
       * lockB.lock();  // will throw an IllegalStateException
       * lockC.lock();  // will throw an IllegalStateException
       *
       * lockA.lock();  // reentrant acquisition is okay
       * }</pre>
       *
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri Dec 15 19:31:54 UTC 2023
    - 35.9K bytes
    - Viewed (0)
  9. pkg/util/iptables/iptables_linux.go

    	"k8s.io/apimachinery/pkg/util/wait"
    )
    
    type locker struct {
    	lock16 *os.File
    	lock14 *net.UnixListener
    }
    
    func (l *locker) Close() error {
    	errList := []error{}
    	if l.lock16 != nil {
    		if err := l.lock16.Close(); err != nil {
    			errList = append(errList, err)
    		}
    	}
    	if l.lock14 != nil {
    		if err := l.lock14.Close(); err != nil {
    			errList = append(errList, err)
    		}
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 24 19:47:49 UTC 2021
    - 2.6K bytes
    - Viewed (0)
  10. internal/lock/lock.go

    // has reached zero, i.e when all the readers have given up their locks.
    type RLockedFile struct {
    	*LockedFile
    	mutex sync.Mutex
    	refs  int // Holds read lock refs.
    }
    
    // IsClosed - Check if the rlocked file is already closed.
    func (r *RLockedFile) IsClosed() bool {
    	r.mutex.Lock()
    	defer r.mutex.Unlock()
    	return r.refs == 0
    }
    
    // IncLockRef - is used by called to indicate lock refs.
    func (r *RLockedFile) IncLockRef() {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Sun Jan 02 17:15:06 UTC 2022
    - 2.5K bytes
    - Viewed (0)
Back to top