Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 27 for ListenableFuture (0.27 sec)

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

      @SafeVarargs
      public static <V extends @Nullable Object> ListenableFuture<List<V>> allAsList(
          ListenableFuture<? extends V>... futures) {
        ListenableFuture<List<@Nullable V>> nullable =
            new ListFuture<V>(ImmutableList.copyOf(futures), true);
        // allAsList ensures that it fills the output list with V instances.
        @SuppressWarnings("nullness")
        ListenableFuture<List<V>> nonNull = nullable;
        return nonNull;
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 59.6K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/FuturesTest.java

      private interface Merger {
    
        ListenableFuture<List<String>> merged(ListenableFuture<String> a, ListenableFuture<String> b);
    
        Merger allMerger =
            new Merger() {
              @Override
              public ListenableFuture<List<String>> merged(
                  ListenableFuture<String> a, ListenableFuture<String> b) {
                return allAsList(ImmutableSet.of(a, b));
              }
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 144.5K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/util/concurrent/FuturesTest.java

      private interface Merger {
    
        ListenableFuture<List<String>> merged(ListenableFuture<String> a, ListenableFuture<String> b);
    
        Merger allMerger =
            new Merger() {
              @Override
              public ListenableFuture<List<String>> merged(
                  ListenableFuture<String> a, ListenableFuture<String> b) {
                return allAsList(ImmutableSet.of(a, b));
              }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 144.5K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java

      private static final class TestCallable implements AsyncCallable<@Nullable Void> {
    
        private final ListenableFuture<@Nullable Void> future;
        private boolean called = false;
    
        private TestCallable(ListenableFuture<@Nullable Void> future) {
          this.future = future;
        }
    
        @Override
        public ListenableFuture<@Nullable Void> call() throws Exception {
          called = true;
          return future;
        }
      }
    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)
  5. android/guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java

      private static final class TestCallable implements AsyncCallable<@Nullable Void> {
    
        private final ListenableFuture<@Nullable Void> future;
        private boolean called = false;
    
        private TestCallable(ListenableFuture<@Nullable Void> future) {
          this.future = future;
        }
    
        @Override
        public ListenableFuture<@Nullable Void> call() throws Exception {
          called = true;
          return future;
        }
      }
    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)
  6. android/guava/src/com/google/common/util/concurrent/ClosingFuture.java

       *   <li>Return a {@code ClosingFuture}. To turn a {@link ListenableFuture} into a {@code
       *       ClosingFuture} call {@link #from(ListenableFuture)}.
       *   <li>In case this step doesn't create new closeables, you can adapt an API that returns a
       *       {@link ListenableFuture} to return a {@code ClosingFuture} by wrapping it with a call to
       *       {@link #withoutCloser(AsyncFunction)}
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 98.5K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/util/concurrent/FluentFutureTest.java

      }
    
      public void testFromFluentFuturePassingAsNonFluent() {
        ListenableFuture<String> f = FluentFuture.from(SettableFuture.<String>create());
        assertThat(FluentFuture.from(f)).isSameInstanceAs(f);
      }
    
      public void testFromNonFluentFuture() throws Exception {
        ListenableFuture<String> f =
            new SimpleForwardingListenableFuture<String>(immediateFuture("a")) {};
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 5.7K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/util/concurrent/FluentFutureTest.java

      }
    
      public void testFromFluentFuturePassingAsNonFluent() {
        ListenableFuture<String> f = FluentFuture.from(SettableFuture.<String>create());
        assertThat(FluentFuture.from(f)).isSameInstanceAs(f);
      }
    
      public void testFromNonFluentFuture() throws Exception {
        ListenableFuture<String> f =
            new SimpleForwardingListenableFuture<String>(immediateFuture("a")) {};
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 5.7K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/util/concurrent/MoreExecutors.java

       *             incomplete and the {@code ListenableFuture} later completes normally, the
       *             listener runs in the thread that completes the {@code ListenableFuture}.
       *         <li>When a listener is attached to a {@code ListenableFuture} and the {@code
       *             ListenableFuture} gets cancelled, the listener runs immediately in the thread that
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 17 16:33:44 GMT 2024
    - 41.8K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java

      }
    
      public void testSetFuture_misbehavingFutureThrows() throws Exception {
        SettableFuture<String> future = SettableFuture.create();
        ListenableFuture<String> badFuture =
            new ListenableFuture<String>() {
              @Override
              public boolean cancel(boolean interrupt) {
                return false;
              }
    
              @Override
    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)
Back to top