Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 107 for CBlock (0.2 sec)

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

          lock.lock();
          try {
            return condition.await(time, unit);
          } finally {
            lock.unlock();
          }
        }
    
        @Override
        public void awaitUninterruptibly() {
          lock.lock();
          try {
            condition.awaitUninterruptibly();
          } finally {
            lock.unlock();
          }
        }
    
        @Override
    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)
  2. android/guava/src/com/google/common/util/concurrent/AbstractScheduledService.java

             * holding a lock. Still, it would be nice to avoid somehow.
             */
            lock.lock();
            try {
              currentFuture.cancel(mayInterruptIfRunning);
            } finally {
              lock.unlock();
            }
          }
    
          @Override
          public boolean isCancelled() {
            lock.lock();
            try {
              return currentFuture.isCancelled();
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Dec 13 19:45:20 GMT 2023
    - 25.8K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/cache/CacheTesting.java

            drainRecencyQueue(segment);
          }
        }
      }
    
      static void drainRecencyQueue(Segment<?, ?> segment) {
        segment.lock();
        try {
          segment.cleanUp();
        } finally {
          segment.unlock();
        }
      }
    
      static void drainReferenceQueues(Cache<?, ?> cache) {
        if (hasLocalCache(cache)) {
          drainReferenceQueues(toLocalCache(cache));
        }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 16.7K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/Queues.java

       * Queue<E> queue = Queues.synchronizedQueue(MinMaxPriorityQueue.<E>create());
       * ...
       * queue.add(element);  // Needn't be in synchronized block
       * ...
       * synchronized (queue) {  // Must synchronize on queue!
       *   Iterator<E> i = queue.iterator(); // Must be in synchronized block
       *   while (i.hasNext()) {
       *     foo(i.next());
       *   }
       * }
       * }</pre>
       *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 16K bytes
    - Viewed (0)
  5. guava/src/com/google/common/base/Internal.java

        "Java7ApiChecker",
      })
      @IgnoreJRERequirement
      static long toNanosSaturated(Duration duration) {
        // Using a try/catch seems lazy, but the catch block will rarely get invoked (except for
        // durations longer than approximately +/- 292 years).
        try {
          return duration.toNanos();
        } catch (ArithmeticException tooBig) {
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Jan 11 14:30:06 GMT 2024
    - 2K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/base/Internal.java

        "Java7ApiChecker",
      })
      @IgnoreJRERequirement
      static long toNanosSaturated(Duration duration) {
        // Using a try/catch seems lazy, but the catch block will rarely get invoked (except for
        // durations longer than approximately +/- 292 years).
        try {
          return duration.toNanos();
        } catch (ArithmeticException tooBig) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Jan 11 14:30:06 GMT 2024
    - 2K bytes
    - Viewed (0)
  7. futures/failureaccess/src/com/google/common/util/concurrent/internal/InternalFutureFailureAccess.java

       * then:
       *
       * <ul>
       *   <li>{@code isDone()} must return {@code true}
       *   <li>{@code isCancelled()} must return {@code false}
       *   <li>{@code get()} must not block, and it must throw an {@code ExecutionException} with the
       *       return value of this method as its cause
       * </ul>
       *
       * <p>This method is {@code protected} so that classes like {@code
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 04 09:45:04 GMT 2023
    - 2.3K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/util/concurrent/ListenableFutureTaskTest.java

        assertFalse(task.isDone());
        assertFalse(task.isCancelled());
    
        // Start the task to put it in the RUNNING state.  Have to use a separate
        // thread because the task will block on the task latch after unblocking
        // the run latch.
        exec.execute(task);
        runLatch.await();
        assertEquals(1, listenerLatch.getCount());
        assertFalse(task.isDone());
        assertFalse(task.isCancelled());
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.7K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/primitives/Ints.java

        //     in all.
        // (3) "Successive". We can consider that we are exchanging a block of size d (a[0..d-1]) with a
        //     block of size n-d (a[d..n-1]), where in general these blocks have different sizes. If we
        //     imagine a line separating the first block from the second, we can proceed by exchanging
        //     the smaller of these blocks with the far end of the other one. That leaves us with a
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 29.7K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/io/IoTestCase.java

          } catch (Exception ignore) {
            // probably URISyntaxException or IllegalArgumentException
            // fall back to copying URLs to files in the testDir == null block below
          }
        }
    
        if (testDir == null) {
          // testdata resources aren't file:// urls, so create a directory to store them in and then
          // copy the resources to the filesystem as needed
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 5.6K bytes
    - Viewed (0)
Back to top