Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 720 for futures (0.68 sec)

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

        assertTrue(future.isDone());
        assertTrue(future.isCancelled());
    
        assertThrows(CancellationException.class, () -> future.get());
      }
    
      public void testFailedFuture(@Nullable String message) throws InterruptedException {
        assertTrue(future.isDone());
        assertFalse(future.isCancelled());
    
        assertTrue(latch.await(5, SECONDS));
        assertTrue(future.isDone());
        assertFalse(future.isCancelled());
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Jul 11 18:52:30 UTC 2025
    - 3.3K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/util/concurrent/WrappingExecutorService.java

      }
    
      @Override
      public final <T extends @Nullable Object> Future<T> submit(Callable<T> task) {
        return delegate.submit(wrapTask(checkNotNull(task)));
      }
    
      @Override
      public final Future<?> submit(Runnable task) {
        return delegate.submit(wrapTask(task));
      }
    
      @Override
      public final <T extends @Nullable Object> Future<T> submit(
          Runnable task, @ParametricNullness T result) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Jul 11 18:52:30 UTC 2025
    - 5.4K bytes
    - Viewed (0)
  3. guava/src/com/google/common/util/concurrent/SimpleTimeLimiter.java

        checkNotNull(timeoutUnit);
        checkPositiveTimeout(timeoutDuration);
    
        Future<T> future = executor.submit(callable);
    
        try {
          return amInterruptible
              ? future.get(timeoutDuration, timeoutUnit)
              : getUninterruptibly(future, timeoutDuration, timeoutUnit);
        } catch (InterruptedException e) {
          future.cancel(true);
          throw e;
        } catch (ExecutionException e) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 9.5K bytes
    - Viewed (0)
  4. guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/AbstractFutureState.java

        Listener old = listeners;
        listeners = update;
        return old;
      }
    
      static boolean casValue(AbstractFutureState<?> future, @Nullable Object expect, Object update) {
        if (future.value == expect) {
          future.value = update;
          return true;
        }
        return false;
      }
    
      final @Nullable Object value() {
        return value;
      }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Feb 21 02:38:37 UTC 2025
    - 1.9K bytes
    - Viewed (0)
  5. android/guava-testlib/src/com/google/common/util/concurrent/testing/MockFutureListener.java

    @GwtIncompatible
    public class MockFutureListener implements Runnable {
      private final CountDownLatch countDownLatch;
      private final ListenableFuture<?> future;
    
      public MockFutureListener(ListenableFuture<?> future) {
        this.countDownLatch = new CountDownLatch(1);
        this.future = future;
    
        future.addListener(this, directExecutor());
      }
    
      @Override
      public void run() {
        countDownLatch.countDown();
      }
    
      /**
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri May 12 18:12:42 UTC 2023
    - 3K bytes
    - Viewed (0)
  6. futures/failureaccess/src/com/google/common/util/concurrent/internal/InternalFutures.java

       *       return value of this method as its cause
       * </ul>
       */
      public static
          Throwable
          tryInternalFastPathGetFailure(InternalFutureFailureAccess future) {
        return future.tryInternalFastPathGetFailure();
      }
    
      private InternalFutures() {}
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Jan 18 02:54:30 UTC 2025
    - 1.7K bytes
    - Viewed (0)
  7. guava-testlib/test/com/google/common/testing/GcFinalizationTest.java

        SettableFuture<@Nullable Void> future = SettableFuture.create();
        Object unused =
            new Object() {
              @SuppressWarnings({"removal", "Finalize"}) // b/260137033
              @Override
              protected void finalize() {
                future.set(null);
              }
            };
        unused = null; // Hint to the JIT that unused is unreachable
        GcFinalization.awaitDone(future);
        assertTrue(future.isDone());
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 7.9K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/util/concurrent/SettableFutureTest.java

        SettableFuture<Integer> future = SettableFuture.create();
        assertTrue(future.set(42));
        // Later attempts to set the future should return false.
        assertFalse(future.set(23));
        assertFalse(future.setException(new Exception("bar")));
        assertFalse(future.setFuture(SettableFuture.<Integer>create()));
        // Check that the future has been set properly.
        assertTrue(future.isDone());
        assertFalse(future.isCancelled());
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  9. android/guava-testlib/src/com/google/common/util/concurrent/testing/AbstractListenableFutureTest.java

        assertFalse(future.isCancelled());
    
        ExecutorService executor = newSingleThreadExecutor();
    
        try {
          Future<Boolean> getResult = executor.submit(() -> future.get());
    
          // Release the future value.
          latch.countDown();
    
          assertTrue(getResult.get(10, SECONDS));
        } finally {
          executor.shutdownNow();
        }
    
        assertTrue(future.isDone());
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Jul 11 18:52:30 UTC 2025
    - 6.1K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/util/concurrent/ListenableFutureTester.java

        assertTrue(future.isDone());
        assertTrue(future.isCancelled());
    
        assertThrows(CancellationException.class, () -> future.get());
      }
    
      public void testFailedFuture(@Nullable String message) throws InterruptedException {
        assertTrue(future.isDone());
        assertFalse(future.isCancelled());
    
        assertTrue(latch.await(5, SECONDS));
        assertTrue(future.isDone());
        assertFalse(future.isCancelled());
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Jul 11 18:52:30 UTC 2025
    - 3.3K bytes
    - Viewed (0)
Back to top