Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for ListenableFutureTask (0.25 sec)

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

      /**
       * Creates a {@code ListenableFutureTask} that will upon running, execute the given {@code
       * Callable}.
       *
       * @param callable the callable task
       * @since 10.0
       */
      public static <V extends @Nullable Object> ListenableFutureTask<V> create(Callable<V> callable) {
        return new ListenableFutureTask<>(callable);
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 04 09:45:04 GMT 2023
    - 4.3K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/util/concurrent/AbstractListeningExecutorService.java

    @ElementTypesAreNonnullByDefault
    public abstract class AbstractListeningExecutorService extends AbstractExecutorService
        implements ListeningExecutorService {
    
      /**
       * @since 19.0 (present with return type {@code ListenableFutureTask} since 14.0)
       */
      @CanIgnoreReturnValue // TODO(kak): consider removing this
      @Override
      protected final <T extends @Nullable Object> RunnableFuture<T> newTaskFor(
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri May 12 18:32:03 GMT 2023
    - 3K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/util/concurrent/ListenableFutureTaskTest.java

      protected final CountDownLatch listenerLatch = new CountDownLatch(1);
    
      protected volatile boolean throwException = false;
    
      protected final ListenableFutureTask<Integer> task =
          ListenableFutureTask.create(
              new Callable<Integer>() {
                @Override
                public Integer call() throws Exception {
                  runLatch.countDown();
                  taskLatch.await();
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.7K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/util/concurrent/TrustedListenableFutureTask.java

    import org.checkerframework.checker.nullness.qual.Nullable;
    
    /**
     * A {@link RunnableFuture} that also implements the {@link ListenableFuture} interface.
     *
     * <p>This should be used in preference to {@link ListenableFutureTask} when possible for
     * performance reasons.
     */
    @GwtCompatible
    @ElementTypesAreNonnullByDefault
    class TrustedListenableFutureTask<V extends @Nullable Object> extends FluentFuture.TrustedFuture<V>
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Oct 01 17:18:04 GMT 2021
    - 5.6K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/util/concurrent/ListenableFutureTaskTest.java

      protected final CountDownLatch listenerLatch = new CountDownLatch(1);
    
      protected volatile boolean throwException = false;
    
      protected final ListenableFutureTask<Integer> task =
          ListenableFutureTask.create(
              new Callable<Integer>() {
                @Override
                public Integer call() throws Exception {
                  runLatch.countDown();
                  taskLatch.await();
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.7K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/util/concurrent/JdkFutureAdapters.java

       *
       * <p>Prefer to create {@code ListenableFuture} instances with {@link SettableFuture}, {@link
       * MoreExecutors#listeningDecorator( java.util.concurrent.ExecutorService)}, {@link
       * ListenableFutureTask}, {@link AbstractFuture}, and other utilities over creating plain {@code
       * Future} instances to be upgraded to {@code ListenableFuture} after the fact.
       */
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Dec 14 20:35:03 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  7. guava/src/com/google/common/cache/CacheLoader.java

          public V load(K key) throws Exception {
            return loader.load(key);
          }
    
          @Override
          public ListenableFuture<V> reload(final K key, final V oldValue) {
            ListenableFutureTask<V> task =
                ListenableFutureTask.create(() -> loader.reload(key, oldValue).get());
            executor.execute(task);
            return task;
          }
    
          @Override
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Dec 19 20:20:14 GMT 2022
    - 9.5K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/cache/CacheLoader.java

          public V load(K key) throws Exception {
            return loader.load(key);
          }
    
          @Override
          public ListenableFuture<V> reload(final K key, final V oldValue) {
            ListenableFutureTask<V> task =
                ListenableFutureTask.create(() -> loader.reload(key, oldValue).get());
            executor.execute(task);
            return task;
          }
    
          @Override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 19 20:20:14 GMT 2022
    - 9.6K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/util/concurrent/SettableFuture.java

     *
     * <p>{@code SettableFuture} is the recommended {@code ListenableFuture} implementation when your
     * task cannot be implemented with {@link ListeningExecutorService}, the various {@link Futures}
     * utility methods, or {@link ListenableFutureTask}. Those APIs have less opportunity for developer
     * error. If your needs are more complex than {@code SettableFuture} supports, use {@link
     * AbstractFuture}, which offers an extensible version of the API.
     *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Oct 01 17:18:04 GMT 2021
    - 2.4K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/util/concurrent/MoreExecutors.java

        return new SequentialExecutor(delegate);
      }
    
      /**
       * Creates an {@link ExecutorService} whose {@code submit} and {@code invokeAll} methods submit
       * {@link ListenableFutureTask} instances to the given delegate executor. Those methods, as well
       * as {@code execute} and {@code invokeAny}, are implemented in terms of calls to {@code
    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)
Back to top