Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 264 for Future (0.2 sec)

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

              }
            };
          }
        },
        ABSTRACT_FUTURE {
          @Override
          ExecutionListWrapper newExecutionList() {
            return new ExecutionListWrapper() {
              final AbstractFuture<?> future = new AbstractFuture<Object>() {};
    
              @Override
              public void add(Runnable runnable, Executor executor) {
                future.addListener(runnable, executor);
              }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 17 15:19:38 GMT 2023
    - 20.4K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/util/concurrent/TimeoutFuture.java

    import java.util.concurrent.Future;
    import java.util.concurrent.ScheduledExecutorService;
    import java.util.concurrent.ScheduledFuture;
    import java.util.concurrent.TimeUnit;
    import java.util.concurrent.TimeoutException;
    import javax.annotation.CheckForNull;
    import org.checkerframework.checker.nullness.qual.Nullable;
    
    /**
     * Implementation of {@code Futures#withTimeout}.
     *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 01 21:46:34 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  3. 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();
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 46.8K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/util/concurrent/SettableFuture.java

      public boolean setException(Throwable throwable) {
        return super.setException(throwable);
      }
    
      @CanIgnoreReturnValue
      @Override
      public boolean setFuture(ListenableFuture<? extends V> future) {
        return super.setFuture(future);
      }
    
      private SettableFuture() {}
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Oct 01 17:18:04 GMT 2021
    - 2.4K bytes
    - Viewed (0)
  5. guava-testlib/src/com/google/common/util/concurrent/testing/SameThreadScheduledExecutorService.java

        return delegate.submit(task);
      }
    
      @Override
      public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks)
          throws InterruptedException {
        Preconditions.checkNotNull(tasks, "tasks must not be null!");
        return delegate.invokeAll(tasks);
      }
    
      @Override
      public <T> List<Future<T>> invokeAll(
          Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Oct 06 00:47:57 GMT 2021
    - 6.4K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/util/concurrent/CollectionFuture.java

      CollectionFuture(
          ImmutableCollection<? extends ListenableFuture<? extends V>> futures,
          boolean allMustSucceed) {
        super(futures, allMustSucceed, true);
    
        List<@Nullable Present<V>> values =
            futures.isEmpty()
                ? Collections.<@Nullable Present<V>>emptyList()
                : Lists.<@Nullable Present<V>>newArrayListWithCapacity(futures.size());
    
        // Populate the results list with null initially.
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 01 21:46:34 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/AbstractAbstractFutureTest.java

      private static void assertSetAsynchronously(AbstractFuture<Integer> future) {
        assertCannotSet(future);
        assertPending(future);
      }
    
      private static void assertPending(AbstractFuture<Integer> future) {
        assertThat(future.isDone()).isFalse();
        assertThat(future.isCancelled()).isFalse();
    
        CountingRunnable listener = new CountingRunnable();
        future.addListener(listener, directExecutor());
        listener.assertNotRun();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 15.5K bytes
    - Viewed (0)
  8. 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();
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 46.8K bytes
    - Viewed (0)
  9. 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());
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 7.3K bytes
    - Viewed (1)
  10. 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());
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 7.3K bytes
    - Viewed (0)
Back to top