Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 18 of 18 for TryLock (1.41 sec)

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

        WeakReference<Object> garbage = new WeakReference<>(new Object());
        GcFinalization.awaitClear(garbage);
        Lock writeLock = striped.get(key).writeLock();
        readLock.lock();
        assertFalse(writeLock.tryLock());
        readLock.unlock();
      }
    
      @AndroidIncompatible // Presumably GC doesn't trigger, despite our efforts.
      public void testStrongImplementations() {
        for (Striped<?> striped : strongImplementations()) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 8.4K bytes
    - Viewed (0)
  2. internal/grid/muxclient.go

    		gridLogIf(m.ctx, err)
    		m.closeLocked()
    		return false
    	}
    }
    
    func (m *muxClient) close() {
    	if debugPrint {
    		fmt.Println("closing outgoing mux", m.MuxID)
    	}
    	if !m.respMu.TryLock() {
    		// Cancel before locking - will unblock any pending sends.
    		if m.cancelFn != nil {
    			m.cancelFn(context.Canceled)
    		}
    		// Wait for senders to release.
    		m.respMu.Lock()
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 14.2K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

        assertTrue(signaledBeforeTimeout);
        assertTimeNotPassed(stopwatch, LONG_DELAY_MS);
        assertInterrupted();
      }
    
      // Lock.tryLock() tests
      public void testTryLockTimeoutExceeded() {
        Stopwatch stopwatch = Stopwatch.createStarted();
        Lock lock = new ReentrantLock();
        Thread lockThread = acquireFor(lock, 5, SECONDS);
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 30.9K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

        assertTrue(signaledBeforeTimeout);
        assertTimeNotPassed(stopwatch, LONG_DELAY_MS);
        assertInterrupted();
      }
    
      // Lock.tryLock() tests
      public void testTryLockTimeoutExceeded() {
        Stopwatch stopwatch = Stopwatch.createStarted();
        Lock lock = new ReentrantLock();
        Thread lockThread = acquireFor(lock, 5, SECONDS);
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 31.7K bytes
    - Viewed (0)
  5. doc/go_mem.html

    </p>
    
    <p class="rule">
    A successful call to <code>l.TryLock</code> (or <code>l.TryRLock</code>)
    is equivalent to a call to <code>l.Lock</code> (or <code>l.RLock</code>).
    An unsuccessful call has no synchronizing effect at all.
    As far as the memory model is concerned,
    <code>l.TryLock</code> (or <code>l.TryRLock</code>)
    may be considered to be able to return false
    HTML
    - Registered: Tue May 07 11:14:38 GMT 2024
    - Last Modified: Mon Mar 04 15:54:42 GMT 2024
    - 26.6K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/cache/LocalCache.java

          }
        }
    
        // reference queues, for garbage collection cleanup
    
        /** Cleanup collected entries when the lock is available. */
        void tryDrainReferenceQueues() {
          if (tryLock()) {
            try {
              drainReferenceQueues();
            } finally {
              unlock();
            }
          }
        }
    
        /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 144.7K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/MapMakerInternalMap.java

        }
    
        // reference queues, for garbage collection cleanup
    
        /** Cleanup collected entries when the lock is available. */
        void tryDrainReferenceQueues() {
          if (tryLock()) {
            try {
              maybeDrainReferenceQueues();
            } finally {
              unlock();
            }
          }
        }
    
        @GuardedBy("this")
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 91.9K bytes
    - Viewed (0)
  8. guava/src/com/google/common/cache/LocalCache.java

          }
        }
    
        // reference queues, for garbage collection cleanup
    
        /** Cleanup collected entries when the lock is available. */
        void tryDrainReferenceQueues() {
          if (tryLock()) {
            try {
              drainReferenceQueues();
            } finally {
              unlock();
            }
          }
        }
    
        /**
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 150.3K bytes
    - Viewed (0)
Back to top