Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 51 for SettableFuture (0.17 sec)

  1. 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 Apr 12 12:43:09 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/AbstractChainedListenableFutureTest.java

      protected static final Exception EXCEPTION = new Exception("Test exception");
    
      protected SettableFuture<Integer> inputFuture;
      protected ListenableFuture<T> resultFuture;
      protected MockFutureListener listener;
    
      @Override
      protected void setUp() throws Exception {
        super.setUp();
    
        inputFuture = SettableFuture.create();
        resultFuture = buildChainingFuture(inputFuture);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.4K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/util/concurrent/AbstractChainedListenableFutureTest.java

      protected static final Exception EXCEPTION = new Exception("Test exception");
    
      protected SettableFuture<Integer> inputFuture;
      protected ListenableFuture<T> resultFuture;
      protected MockFutureListener listener;
    
      @Override
      protected void setUp() throws Exception {
        super.setUp();
    
        inputFuture = SettableFuture.create();
        resultFuture = buildChainingFuture(inputFuture);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.4K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. 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)
  7. guava-tests/test/com/google/common/util/concurrent/UncheckedThrowingFuture.java

    /**
     * A {@link Future} implementation which always throws directly from calls to {@code get()} (i.e.
     * not wrapped in {@code ExecutionException}. For just a normal failure, use {@link
     * SettableFuture}).
     *
     * <p>Useful for testing the behavior of Future utilities against odd futures.
     *
     * @author Anthony Zana
     */
    @GwtCompatible
    final class UncheckedThrowingFuture<V> extends AbstractFuture<V> {
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 12 20:02:10 GMT 2018
    - 3.2K bytes
    - Viewed (0)
  8. 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)
  9. 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)
  10. guava-tests/test/com/google/common/util/concurrent/AggregateFutureStateFallbackAtomicHelperTest.java

        assertEquals(expectedHelperClassName, helperField.get(null).getClass().getSimpleName());
      }
    
      private static ClassLoader getClassLoader(final Set<String> blocklist) {
        final String concurrentPackage = SettableFuture.class.getPackage().getName();
        ClassLoader classLoader = AggregateFutureStateFallbackAtomicHelperTest.class.getClassLoader();
        // we delegate to the current classloader so both loaders agree on classes like TestCase
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 5.9K bytes
    - Viewed (0)
Back to top