Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 164 for FUTURE (0.06 sec)

  1. android/guava/src/com/google/common/util/concurrent/AggregateFuture.java

          // at the beginning of the loop.
          int i = 0;
          for (ListenableFuture<? extends InputT> future : futures) {
            int index = i++;
            if (future.isDone()) {
              processAllMustSucceedDoneFuture(index, future);
            } else {
              future.addListener(
                  () -> processAllMustSucceedDoneFuture(index, future), directExecutor());
            }
          }
        } else {
          /*
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 13:13:32 UTC 2024
    - 16.2K bytes
    - Viewed (0)
  2. guava/src/com/google/common/util/concurrent/Futures.java

       * completes. Cancelling the supplied future will also cancel the returned future, but cancelling
       * the returned future will have no effect on the supplied future.
       *
       * @since 15.0
       */
      public static <V extends @Nullable Object> ListenableFuture<V> nonCancellationPropagating(
          ListenableFuture<V> future) {
        if (future.isDone()) {
          return future;
        }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 13:13:32 UTC 2024
    - 64.4K bytes
    - Viewed (0)
  3. guava/src/com/google/common/util/concurrent/FluentFuture.java

      }
    
      /**
       * Returns a new {@code Future} whose result is asynchronously derived from the result of this
       * {@code Future}. If the input {@code Future} fails, the returned {@code Future} fails with the
       * same exception (and the function is not invoked).
       *
       * <p>More precisely, the returned {@code Future} takes its result from a {@code Future} produced
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:51:36 UTC 2024
    - 19.6K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/AbstractAbstractFutureTest.java

        assertThat(future.isDone()).isFalse();
        assertThat(future.set(1)).isTrue();
        assertSuccessful(future, 1);
      }
    
      public void testSetFutureNull() throws Exception {
        assertThrows(NullPointerException.class, () -> future.setFuture(null));
    
        assertThat(future.isDone()).isFalse();
        assertThat(future.set(1)).isTrue();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 15:41:36 UTC 2024
    - 15.5K bytes
    - Viewed (0)
  5. android/guava-testlib/test/com/google/common/testing/GcFinalizationTest.java

        final 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 02:42:09 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  6. android/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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java

        InterruptibleFuture future = new InterruptibleFuture();
        assertTrue(future.cancel(false));
        assertTrue(future.isCancelled());
        assertTrue(future.isDone());
        assertFalse(future.wasInterrupted());
        assertFalse(future.interruptTaskWasCalled);
        CancellationException e = assertThrows(CancellationException.class, () -> future.get());
        assertThat(e).hasCauseThat().isNull();
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 47.1K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/util/concurrent/Uninterruptibles.java

      public static <V extends @Nullable Object> V getUninterruptibly(
          Future<V> future, Duration timeout) throws ExecutionException, TimeoutException {
        return getUninterruptibly(future, toNanosSaturated(timeout), TimeUnit.NANOSECONDS);
      }
    
      /**
       * Invokes {@code future.}{@link Future#get(long, TimeUnit) get(timeout, unit)} uninterruptibly.
       *
       * <p>Similar methods:
       *
       * <ul>
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:51:36 UTC 2024
    - 20.1K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/util/concurrent/WrappingScheduledExecutorServiceTest.java

        }
    
        @Override
        public <T> Future<T> submit(Callable<T> task) {
          throw new UnsupportedOperationException();
        }
    
        @Override
        public Future<?> submit(Runnable task) {
          throw new UnsupportedOperationException();
        }
    
        @Override
        public <T> Future<T> submit(Runnable task, T result) {
          throw new UnsupportedOperationException();
        }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  10. guava-testlib/test/com/google/common/testing/GcFinalizationTest.java

        final 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 02:42:09 UTC 2024
    - 7.9K bytes
    - Viewed (0)
Back to top