Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 20 for ReentrantLock (0.16 seconds)

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

            .add(new Striped.SmallLazyStriped<Lock>(50, ReentrantLock::new))
            .add(new Striped.SmallLazyStriped<Lock>(64, ReentrantLock::new))
            .add(new Striped.LargeLazyStriped<Lock>(50, ReentrantLock::new))
            .add(new Striped.LargeLazyStriped<Lock>(64, ReentrantLock::new))
            .add(new Striped.SmallLazyStriped<Semaphore>(50, SEMAPHORE_SUPPLER))
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 8.1K bytes
    - Click Count (0)
  2. guava-tests/test/com/google/common/util/concurrent/StripedTest.java

            .add(new Striped.SmallLazyStriped<Lock>(50, ReentrantLock::new))
            .add(new Striped.SmallLazyStriped<Lock>(64, ReentrantLock::new))
            .add(new Striped.LargeLazyStriped<Lock>(50, ReentrantLock::new))
            .add(new Striped.LargeLazyStriped<Lock>(64, ReentrantLock::new))
            .add(new Striped.SmallLazyStriped<Semaphore>(50, SEMAPHORE_SUPPLER))
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 8.1K bytes
    - Click Count (0)
  3. android/guava-tests/test/com/google/common/util/concurrent/CycleDetectingLockFactoryTest.java

      private ReentrantReadWriteLock.WriteLock writeLockC;
      private ReentrantLock lock1;
      private ReentrantLock lock2;
      private ReentrantLock lock3;
      private ReentrantLock lock01;
      private ReentrantLock lock02;
      private ReentrantLock lock03;
    
      @Override
      protected void setUp() throws Exception {
        super.setUp();
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 16.3K bytes
    - Click Count (0)
  4. guava-tests/test/com/google/common/util/concurrent/CycleDetectingLockFactoryTest.java

      private ReentrantReadWriteLock.WriteLock writeLockC;
      private ReentrantLock lock1;
      private ReentrantLock lock2;
      private ReentrantLock lock3;
      private ReentrantLock lock01;
      private ReentrantLock lock02;
      private ReentrantLock lock03;
    
      @Override
      protected void setUp() throws Exception {
        super.setUp();
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 16.3K bytes
    - Click Count (0)
  5. android/guava/src/com/google/common/util/concurrent/Monitor.java

    import java.util.concurrent.locks.Condition;
    import java.util.concurrent.locks.ReentrantLock;
    import java.util.function.BooleanSupplier;
    import org.jspecify.annotations.Nullable;
    
    /**
     * A synchronization abstraction supporting waiting on arbitrary boolean conditions.
     *
     * <p>This class is intended as a replacement for {@link ReentrantLock}. Code using {@code Monitor}
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Jan 28 22:39:02 GMT 2026
    - 43.5K bytes
    - Click Count (0)
  6. android/guava-tests/benchmark/com/google/common/util/concurrent/CycleDetectingLockFactoryBenchmark.java

        for (int i = 0; i < lockNestingDepth; i++) {
          plainLocks[i] = new ReentrantLock();
        }
        this.detectingLocks = new Lock[lockNestingDepth];
        for (int i = 0; i < lockNestingDepth; i++) {
          detectingLocks[i] = factory.newReentrantLock("Lock" + i);
        }
      }
    
      @Benchmark
      void unorderedPlainLocks(int reps) {
        lockAndUnlock(new ReentrantLock(), reps);
      }
    
      @Benchmark
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Dec 19 18:03:30 GMT 2024
    - 2.5K bytes
    - Click Count (0)
  7. android/guava/src/com/google/common/util/concurrent/CycleDetectingLockFactory.java

      public ReentrantLock newReentrantLock(String lockName) {
        return newReentrantLock(lockName, false);
      }
    
      /**
       * Creates a {@link ReentrantLock} with the given fairness policy. The {@code lockName} is used in
       * the warning or exception output to help identify the locks involved in the detected deadlock.
       */
      public ReentrantLock newReentrantLock(String lockName, boolean fair) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Apr 01 17:27:13 GMT 2026
    - 36K bytes
    - Click Count (0)
  8. android/guava/src/com/google/common/util/concurrent/AbstractScheduledService.java

        // shutDown or runOneIteration) run concurrently with one another.
        // TODO(lukes): why don't we use ListenableFuture to sequence things? Then we could drop the
        // lock.
        private final ReentrantLock lock = new ReentrantLock();
    
        @WeakOuter
        final class Task implements Runnable {
          @Override
          public void run() {
            lock.lock();
            try {
              /*
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sat Aug 09 01:14:59 GMT 2025
    - 27.7K bytes
    - Click Count (0)
  9. src/main/java/jcifs/internal/smb2/Smb2SigningDigest.java

        /**
         *
         */
        private static final int SIGNATURE_OFFSET = 48;
        private static final int SIGNATURE_LENGTH = 16;
        private final Mac digest;
        private final ReentrantLock signingLock = new ReentrantLock();
        private byte[] signingKey;
        private final String algorithmName;
        private final java.security.Provider provider;
        private volatile boolean closed = false;
    
        /**
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 30 05:58:03 GMT 2025
    - 9.9K bytes
    - Click Count (0)
  10. guava-tests/benchmark/com/google/common/util/concurrent/StripedBenchmark.java

    import com.google.common.primitives.Ints;
    import java.util.ArrayList;
    import java.util.Collections;
    import java.util.List;
    import java.util.Random;
    import java.util.concurrent.locks.Lock;
    import java.util.concurrent.locks.ReentrantLock;
    import org.jspecify.annotations.NullUnmarked;
    
    /** A benchmark comparing the various striped implementations. */
    @VmOptions({"-Xms12g", "-Xmx12g", "-d64"})
    @NullUnmarked
    public class StripedBenchmark {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Dec 19 18:03:30 GMT 2024
    - 4K bytes
    - Click Count (0)
Back to Top