Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 107 for CBlock (0.33 sec)

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

       */
      public void testRegularFutureInterrupted() throws ExecutionException {
    
        /*
         * Here's the order of events that we want.
         *
         * 1. The client thread begins to block on a get() call to a future.
         * 2. The client thread is interrupted sometime before the result would be
         *   available.
         * 3. We expect the client's get() to throw an InterruptedException.
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 9.1K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/util/concurrent/SequentialExecutor.java

        }
    
        /*
         * This is an unsynchronized read! After the read, the function returns immediately or acquires
         * the lock to check again. Since an IDLE state was observed inside the preceding synchronized
         * block, and reference field assignment is atomic, this may save reacquiring the lock when
         * another thread or the worker task has cleared the count and set the state.
         *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 01 21:46:34 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  3. guava/src/com/google/common/cache/CacheBuilderSpec.java

          }
        }
    
        return spec;
      }
    
      /** Returns a CacheBuilderSpec that will prevent caching. */
      public static CacheBuilderSpec disableCaching() {
        // Maximum size of zero is one way to block caching
        return CacheBuilderSpec.parse("maximumSize=0");
      }
    
      /** Returns a CacheBuilder configured according to this instance's specification. */
      CacheBuilder<Object, Object> toCacheBuilder() {
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Aug 22 14:27:44 GMT 2022
    - 18.1K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java

        MEDIUM_DELAY_MS = SHORT_DELAY_MS * 10;
        LONG_DELAY_MS = SHORT_DELAY_MS * 200;
      }
    
      /**
       * Returns a timeout in milliseconds to be used in tests that verify that operations block or time
       * out.
       */
      long timeoutMillis() {
        return SHORT_DELAY_MS / 4;
      }
    
      /** Returns a new Date instance representing a time delayMillis milliseconds in the future. */
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 37.7K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/io/testdata/alice_in_wonderland.txt

    beating.  Now, if you only kept on good terms with him, he'd do
    almost anything you liked with the clock.  For instance, suppose
    it were nine o'clock in the morning, just time to begin lessons:
    you'd only have to whisper a hint to Time, and round goes the
    clock in a twinkling!  Half-past one, time for dinner!'
    
      (`I only wish it was,' the March Hare said to itself in a
    whisper.)
    
    Plain Text
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Oct 29 21:35:03 GMT 2012
    - 145.2K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/CycleDetectingLockFactoryTest.java

        Lock myLock = CycleDetectingLockFactory.newInstance(Policies.THROW).newReentrantLock("MyLock");
        lock03.lock();
        myLock.lock();
        lock03.unlock();
    
        PotentialDeadlockException expected =
            assertThrows(PotentialDeadlockException.class, () -> lock01.lock());
        checkMessage(
            expected,
            "MyLock -> OtherOrder.FIRST",
            "OtherOrder.THIRD -> MyLock",
    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)
  7. android/guava-tests/benchmark/com/google/common/util/concurrent/CycleDetectingLockFactoryBenchmark.java

      }
    
      @Benchmark
      void unorderedCycleDetectingLocks(int reps) {
        lockAndUnlock(factory.newReentrantLock("foo"), reps);
      }
    
      private static void lockAndUnlock(Lock lock, int reps) {
        for (int i = 0; i < reps; i++) {
          lock.lock();
          lock.unlock();
        }
      }
    
      @Benchmark
      void orderedPlainLocks(int reps) {
        lockAndUnlockNested(plainLocks, reps);
      }
    
      @Benchmark
    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)
  8. guava/src/com/google/common/cache/LocalCache.java

          } finally {
            unlock();
            postWriteCleanup();
          }
        }
    
        // 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)
  9. guava-tests/test/com/google/common/util/concurrent/StripedTest.java

            .add(new Striped.SmallLazyStriped<ReadWriteLock>(50, READ_WRITE_LOCK_SUPPLIER))
            .add(new Striped.SmallLazyStriped<ReadWriteLock>(64, READ_WRITE_LOCK_SUPPLIER))
            .add(new Striped.LargeLazyStriped<ReadWriteLock>(50, READ_WRITE_LOCK_SUPPLIER))
            .add(new Striped.LargeLazyStriped<ReadWriteLock>(64, READ_WRITE_LOCK_SUPPLIER))
            .add(new Striped.SmallLazyStriped<Lock>(50, LOCK_SUPPLER))
    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)
  10. android/guava-tests/test/com/google/common/util/concurrent/FuturesTransformAsyncTest.java

      }
    
      public void testFutureCancellableBeforeFunctionCompletion() throws Exception {
        // Set the result in a separate thread since this test runs the function
        // (which will block) in the same thread.
        new Thread() {
          @Override
          public void run() {
            inputFuture.set(SLOW_FUNC_VALID_INPUT_DATA);
          }
        }.start();
        funcIsWaitingLatch.await();
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.1K bytes
    - Viewed (0)
Back to top