Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 327 for Future (0.23 sec)

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

        assertTrue(future.isDone());
        assertFalse(future.isCancelled());
    
        assertTrue(latch.await(5, TimeUnit.SECONDS));
        assertTrue(future.isDone());
        assertFalse(future.isCancelled());
    
        assertEquals(expectedValue, future.get());
      }
    
      public void testCancelledFuture() throws InterruptedException, ExecutionException {
        assertTrue(future.isDone());
        assertTrue(future.isCancelled());
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.3K bytes
    - Viewed (0)
  2. android/guava-testlib/test/com/google/common/util/concurrent/testing/TestingExecutorsTest.java

                return taskDone;
              }
            };
        List<Future<Boolean>> futureList =
            executor.invokeAll(ImmutableList.of(task), 10, TimeUnit.MILLISECONDS);
        Future<Boolean> future = futureList.get(0);
        assertFalse(taskDone);
        assertTrue(future.isDone());
        assertThrows(CancellationException.class, () -> future.get());
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.7K bytes
    - Viewed (0)
  3. maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/CompletionServiceStub.java

                projectBuildFutureTask.run();
            }
            return projectBuildFutureTask;
        }
    
        public Future<ProjectSegment> take() throws InterruptedException {
            return null;
        }
    
        public Future<ProjectSegment> poll() {
            return null;
        }
    
        public Future<ProjectSegment> poll(long timeout, TimeUnit unit) throws InterruptedException {
            return null;
        }
    Java
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Wed Sep 06 08:39:32 GMT 2023
    - 2.6K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/util/concurrent/FuturesGetUncheckedTest.java

    import static com.google.common.util.concurrent.FuturesGetCheckedInputs.FAILED_FUTURE_ERROR;
    import static com.google.common.util.concurrent.FuturesGetCheckedInputs.FAILED_FUTURE_OTHER_THROWABLE;
    import static com.google.common.util.concurrent.FuturesGetCheckedInputs.FAILED_FUTURE_UNCHECKED_EXCEPTION;
    import static com.google.common.util.concurrent.FuturesGetCheckedInputs.OTHER_THROWABLE;
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  5. guava-testlib/test/com/google/common/testing/GcFinalizationTest.java

      public void testAwaitDone_Future_Cancel() {
        final SettableFuture<@Nullable Void> future = SettableFuture.create();
        Object x =
            new Object() {
              @Override
              protected void finalize() {
                future.cancel(false);
              }
            };
        x = null; // Hint to the JIT that x is unreachable
        GcFinalization.awaitDone(future);
        assertTrue(future.isDone());
        assertTrue(future.isCancelled());
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 7.4K bytes
    - Viewed (0)
  6. android/guava-testlib/test/com/google/common/testing/GcFinalizationTest.java

      public void testAwaitDone_Future_Cancel() {
        final SettableFuture<@Nullable Void> future = SettableFuture.create();
        Object x =
            new Object() {
              @Override
              protected void finalize() {
                future.cancel(false);
              }
            };
        x = null; // Hint to the JIT that x is unreachable
        GcFinalization.awaitDone(future);
        assertTrue(future.isDone());
        assertTrue(future.isCancelled());
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 7.4K bytes
    - Viewed (0)
  7. 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)
  8. android/guava/src/com/google/common/util/concurrent/ListenableFuture.java

     * result. (If you want such access, you may prefer {@link Futures#addCallback
     * Futures.addCallback}.) Still, direct {@code addListener} calls are occasionally useful:
     *
     * <pre>{@code
     * final String name = ...;
     * inFlight.add(name);
     * ListenableFuture<Result> future = service.query(name);
     * future.addListener(new Runnable() {
     *   public void run() {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Jun 26 21:13:41 GMT 2023
    - 8K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/collect/QueuesTest.java

          Future<?> possiblyIgnoredError = threadPool.submit(new Producer(q, 20));
          @SuppressWarnings("unused") // https://errorprone.info/bugpattern/FutureReturnValueIgnored
          Future<?> possiblyIgnoredError1 = threadPool.submit(new Producer(q, 20));
          @SuppressWarnings("unused") // https://errorprone.info/bugpattern/FutureReturnValueIgnored
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 12K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/collect/QueuesTest.java

          Future<?> possiblyIgnoredError = threadPool.submit(new Producer(q, 20));
          @SuppressWarnings("unused") // https://errorprone.info/bugpattern/FutureReturnValueIgnored
          Future<?> possiblyIgnoredError1 = threadPool.submit(new Producer(q, 20));
          @SuppressWarnings("unused") // https://errorprone.info/bugpattern/FutureReturnValueIgnored
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 12K bytes
    - Viewed (0)
Back to top