Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 63 for callback (0.21 sec)

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

        MockCallback callback = new MockCallback("foo");
        addCallback(f, callback, directExecutor());
        f.set("foo");
      }
    
      public void testExecutorSuccess() {
        CountingSameThreadExecutor ex = new CountingSameThreadExecutor();
        SettableFuture<String> f = SettableFuture.create();
        MockCallback callback = new MockCallback("foo");
        Futures.addCallback(f, callback, ex);
        f.set("foo");
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Nov 15 16:33:21 GMT 2022
    - 6.3K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/util/concurrent/ListenerCallQueue.java

       * case of an error.
       *
       * @param event the callback to execute on {@link #dispatch}
       */
      public void enqueue(Event<L> event) {
        enqueueHelper(event, event);
      }
    
      /**
       * Enqueues an event to be run on currently known listeners, with a label.
       *
       * @param event the callback to execute on {@link #dispatch}
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Dec 13 19:45:20 GMT 2023
    - 8.2K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/util/concurrent/FutureCallbackTest.java

        MockCallback callback = new MockCallback("foo");
        addCallback(f, callback, directExecutor());
        f.set("foo");
      }
    
      public void testExecutorSuccess() {
        CountingSameThreadExecutor ex = new CountingSameThreadExecutor();
        SettableFuture<String> f = SettableFuture.create();
        MockCallback callback = new MockCallback("foo");
        Futures.addCallback(f, callback, ex);
        f.set("foo");
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Apr 06 12:56:11 GMT 2023
    - 6.3K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/util/concurrent/FutureCallback.java

    import com.google.common.annotations.GwtCompatible;
    import java.util.concurrent.ExecutionException;
    import java.util.concurrent.Future;
    import org.checkerframework.checker.nullness.qual.Nullable;
    
    /**
     * A callback for accepting the results of a {@link java.util.concurrent.Future} computation
     * asynchronously.
     *
     * <p>To attach to a {@link ListenableFuture} use {@link Futures#addCallback}.
     *
     * @author Anthony Zana
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 05 22:27:35 GMT 2021
    - 1.6K bytes
    - Viewed (0)
  5. guava-testlib/test/com/google/common/testing/TearDownStackTest.java

        boolean ran = false;
        @Nullable Callback callback = null;
    
        public SimpleTearDown() {}
    
        public SimpleTearDown(Callback callback) {
          this.callback = callback;
        }
    
        @Override
        public void tearDown() throws Exception {
          if (callback != null) {
            callback.run();
          }
          ran = true;
        }
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Apr 17 15:19:38 GMT 2023
    - 4.6K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/util/concurrent/FluentFuture.java

       * java.util.concurrent.CompletableFuture#thenAcceptAsync}.
       *
       * @param callback The callback to invoke when this {@code Future} is completed.
       * @param executor The executor to run {@code callback} when the future completes.
       */
      public final void addCallback(FutureCallback<? super V> callback, Executor executor) {
        Futures.addCallback(this, callback, executor);
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 11 19:08:44 GMT 2023
    - 18.7K bytes
    - Viewed (0)
  7. android/guava-testlib/test/com/google/common/testing/TearDownStackTest.java

        boolean ran = false;
        @Nullable Callback callback = null;
    
        public SimpleTearDown() {}
    
        public SimpleTearDown(Callback callback) {
          this.callback = callback;
        }
    
        @Override
        public void tearDown() throws Exception {
          if (callback != null) {
            callback.run();
          }
          ran = true;
        }
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 17 15:19:38 GMT 2023
    - 4.6K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/io/Resources.java

      }
    
      /**
       * Streams lines from a URL, stopping when our callback returns false, or we have read all of the
       * lines.
       *
       * @param url the URL to read from
       * @param charset the charset used to decode the input stream; see {@link Charsets} for helpful
       *     predefined constants
       * @param callback the LineProcessor to use to handle the lines
       * @return the output of processing the lines
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 28 20:13:02 GMT 2023
    - 7.4K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/util/concurrent/AggregateFuture.java

         * handleAllCompleted(), they will already have been nulled out. But in the case of
         * whenAll*().call*(), this future may be pending until the callback runs -- or even longer in
         * the case of callAsync(), which waits for the callback's returned future to complete.
         */
        releaseResources(ALL_INPUT_FUTURES_PROCESSED);
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 01 21:46:34 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/util/concurrent/AbstractChainedListenableFutureTest.java

        listener = new MockFutureListener(resultFuture);
      }
    
      public void testFutureGetBeforeCallback() throws Exception {
        // Verify that get throws a timeout exception before the callback is called.
        assertThrows(TimeoutException.class, () -> resultFuture.get(1L, TimeUnit.MILLISECONDS));
      }
    
      public void testFutureGetThrowsWrappedException() throws Exception {
        inputFuture.setException(EXCEPTION);
    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)
Back to top