Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for readLock (0.4 sec)

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

      private ReentrantLock lockA;
      private ReentrantLock lockB;
      private ReentrantLock lockC;
      private ReentrantReadWriteLock.ReadLock readLockA;
      private ReentrantReadWriteLock.ReadLock readLockB;
      private ReentrantReadWriteLock.ReadLock readLockC;
      private ReentrantReadWriteLock.WriteLock writeLockA;
      private ReentrantReadWriteLock.WriteLock writeLockB;
      private ReentrantReadWriteLock.WriteLock writeLockC;
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 16.1K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/util/concurrent/CycleDetectingLockFactory.java

          super(fair);
          this.readLock = new CycleDetectingReentrantReadLock(this);
          this.writeLock = new CycleDetectingReentrantWriteLock(this);
          this.lockGraphNode = Preconditions.checkNotNull(lockGraphNode);
        }
    
        ///// Overridden ReentrantReadWriteLock methods. /////
    
        @Override
        public ReadLock readLock() {
          return readLock;
        }
    
        @Override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Dec 15 19:31:54 GMT 2023
    - 35.9K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/util/concurrent/StripedTest.java

        Object key = new Object();
        Lock readLock = striped.get(key).readLock();
        WeakReference<Object> garbage = new WeakReference<>(new Object());
        GcFinalization.awaitClear(garbage);
        Lock writeLock = striped.get(key).writeLock();
        readLock.lock();
        assertFalse(writeLock.tryLock());
        readLock.unlock();
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 8.4K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/CycleDetectingLockFactoryTest.java

      private ReentrantLock lockA;
      private ReentrantLock lockB;
      private ReentrantLock lockC;
      private ReentrantReadWriteLock.ReadLock readLockA;
      private ReentrantReadWriteLock.ReadLock readLockB;
      private ReentrantReadWriteLock.ReadLock readLockC;
      private ReentrantReadWriteLock.WriteLock writeLockA;
      private ReentrantReadWriteLock.WriteLock writeLockB;
      private ReentrantReadWriteLock.WriteLock writeLockC;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 16.1K bytes
    - Viewed (1)
  5. android/guava-tests/test/com/google/common/util/concurrent/StripedTest.java

        Object key = new Object();
        Lock readLock = striped.get(key).readLock();
        WeakReference<Object> garbage = new WeakReference<>(new Object());
        GcFinalization.awaitClear(garbage);
        Lock writeLock = striped.get(key).writeLock();
        readLock.lock();
        assertFalse(writeLock.tryLock());
        readLock.unlock();
      }
    
    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)
  6. android/guava/src/com/google/common/util/concurrent/Striped.java

        private final ReadWriteLock delegate;
    
        WeakSafeReadWriteLock() {
          this.delegate = new ReentrantReadWriteLock();
        }
    
        @Override
        public Lock readLock() {
          return new WeakSafeLock(delegate.readLock(), this);
        }
    
        @Override
        public Lock writeLock() {
          return new WeakSafeLock(delegate.writeLock(), this);
        }
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 10 20:55:18 GMT 2023
    - 20.3K bytes
    - Viewed (1)
  7. android/guava-tests/test/com/google/common/util/concurrent/ServiceManagerTest.java

       * This covers a bug where if a listener was installed that would stop the manager if any service
       * fails and something failed during startup before service.start was called on all the services,
       * then awaitStopped would deadlock due to an IllegalStateException that was thrown when trying to
       * stop the timer(!).
       */
      public void testFailStart_stopOthers() throws TimeoutException {
        Service a = new FailStartService();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Oct 02 17:20:27 GMT 2023
    - 23.2K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/util/concurrent/MoreExecutors.java

       * under {@code directExecutor}: Not only might the wait for a lock be long, but if the running
       * thread was holding a lock, the listener may deadlock or break lock isolation.
       *
       * <p>This instance is equivalent to:
       *
       * <pre>{@code
       * final class DirectExecutor implements Executor {
       *   public void execute(Runnable r) {
       *     r.run();
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 17 16:33:44 GMT 2024
    - 41.8K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/util/concurrent/AbstractScheduledServiceTest.java

        Thread.sleep(UNIT.toMillis(3 * DELAY));
        assertEquals(1, service.numIterations.get());
      }
    
      public void testCustomScheduler_deadlock() throws InterruptedException, BrokenBarrierException {
        final CyclicBarrier inGetNextSchedule = new CyclicBarrier(2);
        // This will flakily deadlock, so run it multiple times to increase the flake likelihood
        for (int i = 0; i < 1000; i++) {
          Service service =
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 22.5K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/util/concurrent/InterruptibleTaskTest.java

    import junit.framework.TestCase;
    import org.checkerframework.checker.nullness.qual.Nullable;
    
    public final class InterruptibleTaskTest extends TestCase {
    
      // Regression test for a deadlock where a task could be stuck busy waiting for the task to
      // transition to DONE
      public void testInterruptThrows() throws Exception {
        final CountDownLatch isInterruptibleRegistered = new CountDownLatch(1);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.6K bytes
    - Viewed (0)
Back to top