Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 37 for SettableFuture (0.19 sec)

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

        try {
          getDone(immediateCancelledFuture());
          fail();
        } catch (CancellationException expected) {
        }
      }
    
      public void testPending() throws ExecutionException {
        try {
          getDone(SettableFuture.create());
          fail();
        } catch (IllegalStateException expected) {
        }
      }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 2.2K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/FuturesGetUncheckedTest.java

          assertTrue(Thread.currentThread().isInterrupted());
        } finally {
          Thread.interrupted();
        }
      }
    
      public void testGetUnchecked_cancelled() {
        SettableFuture<String> future = SettableFuture.create();
        future.cancel(true);
        try {
          getUnchecked(future);
          fail();
        } catch (CancellationException expected) {
        }
      }
    
    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)
  3. futures/listenablefuture1/src/com/google/common/util/concurrent/ListenableFuture.java

     *   <li>If you manually call {@link java.util.concurrent.FutureTask#set} or a similar method,
     *       create a {@link SettableFuture} instead. (If your needs are more complex, you may prefer
     *       {@link AbstractFuture}.)
     * </ul>
     *
     * <p><b>Test doubles</b>: If you need a {@code ListenableFuture} for your test, try a {@link
     * SettableFuture} or one of the methods in the {@link Futures#immediateFuture Futures.immediate*}
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Jun 26 21:13:41 GMT 2023
    - 8K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/FuturesTransformAsyncTest.java

      protected static final int SLOW_OUTPUT_VALID_INPUT_DATA = 2;
      protected static final int SLOW_FUNC_VALID_INPUT_DATA = 3;
      private static final String RESULT_DATA = "SUCCESS";
    
      private SettableFuture<String> outputFuture;
      // Signals that the function is waiting to complete
      private CountDownLatch funcIsWaitingLatch;
      // Signals the function so it will complete
      private CountDownLatch funcCompletionLatch;
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.1K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/util/concurrent/ListenableFuture.java

     *   <li>If you manually call {@link java.util.concurrent.FutureTask#set} or a similar method,
     *       create a {@link SettableFuture} instead. (If your needs are more complex, you may prefer
     *       {@link AbstractFuture}.)
     * </ul>
     *
     * <p><b>Test doubles</b>: If you need a {@code ListenableFuture} for your test, try a {@link
     * SettableFuture} or one of the methods in the {@link Futures#immediateFuture Futures.immediate*}
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Jun 26 21:13:41 GMT 2023
    - 8K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/util/concurrent/SequentialExecutorTest.java

          service.shutdown();
        }
      }
    
      public void testRejectedExecutionThrownWithMultipleCalls() throws Exception {
        final CountDownLatch latch = new CountDownLatch(1);
        final SettableFuture<?> future = SettableFuture.create();
        final Executor delegate =
            new Executor() {
              @Override
              public void execute(Runnable task) {
                if (future.set(null)) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 11.4K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java

        WeakReference<Object> ref = new WeakReference<>(toBeGCed);
        final SettableFuture<@Nullable Void> settableFuture = SettableFuture.create();
        ListenableFuture<?> ignored =
            serializer.submitAsync(
                new AsyncCallable<@Nullable Void>() {
                  @Override
                  public ListenableFuture<@Nullable Void> call() {
                    return settableFuture;
                  }
                },
                directExecutor());
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 16.8K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java

        WeakReference<Object> ref = new WeakReference<>(toBeGCed);
        final SettableFuture<@Nullable Void> settableFuture = SettableFuture.create();
        ListenableFuture<?> ignored =
            serializer.submitAsync(
                new AsyncCallable<@Nullable Void>() {
                  @Override
                  public ListenableFuture<@Nullable Void> call() {
                    return settableFuture;
                  }
                },
                directExecutor());
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 16.8K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/util/concurrent/SequentialExecutorTest.java

          service.shutdown();
        }
      }
    
      public void testRejectedExecutionThrownWithMultipleCalls() throws Exception {
        final CountDownLatch latch = new CountDownLatch(1);
        final SettableFuture<?> future = SettableFuture.create();
        final Executor delegate =
            new Executor() {
              @Override
              public void execute(Runnable task) {
                if (future.set(null)) {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 11.4K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/util/concurrent/ExecutionSequencer.java

         * have completed - namely after oldFuture is done, and taskFuture has either completed or been
         * cancelled before the callable started execution.
         */
        SettableFuture<@Nullable Void> newFuture = SettableFuture.create();
    
        ListenableFuture<@Nullable Void> oldFuture = ref.getAndSet(newFuture);
    
        // Invoke our task once the previous future completes.
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 01 21:46:34 GMT 2024
    - 22.1K bytes
    - Viewed (0)
Back to top