Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for newReentrantLock (0.24 sec)

  1. android/guava-tests/benchmark/com/google/common/util/concurrent/CycleDetectingLockFactoryBenchmark.java

        for (int i = 0; i < lockNestingDepth; i++) {
          detectingLocks[i] = factory.newReentrantLock("Lock" + i);
        }
      }
    
      @Benchmark
      void unorderedPlainLocks(int reps) {
        lockAndUnlock(new ReentrantLock(), reps);
      }
    
      @Benchmark
      void unorderedCycleDetectingLocks(int reps) {
        lockAndUnlock(factory.newReentrantLock("foo"), reps);
      }
    
      private static void lockAndUnlock(Lock lock, int reps) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.4K bytes
    - Viewed (0)
  2. guava-tests/benchmark/com/google/common/util/concurrent/CycleDetectingLockFactoryBenchmark.java

        for (int i = 0; i < lockNestingDepth; i++) {
          detectingLocks[i] = factory.newReentrantLock("Lock" + i);
        }
      }
    
      @Benchmark
      void unorderedPlainLocks(int reps) {
        lockAndUnlock(new ReentrantLock(), reps);
      }
    
      @Benchmark
      void unorderedCycleDetectingLocks(int reps) {
        lockAndUnlock(factory.newReentrantLock("foo"), reps);
      }
    
      private static void lockAndUnlock(Lock lock, int reps) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.4K bytes
    - Viewed (0)
Back to top