Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for TrustedListenableFutureTask (0.15 sec)

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

     */
    public class AbstractListeningExecutorServiceTest extends TestCase {
    
      public void testSubmit() throws Exception {
        /*
         * Mostly just tests that TrustedListenableFutureTask are created and run; tests for
         * TrustedListenableFutureTask should ensure that listeners are called correctly.
         */
    
        TestListeningExecutorService e = new TestListeningExecutorService();
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 3.2K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/util/concurrent/AbstractListeningExecutorServiceTest.java

     */
    public class AbstractListeningExecutorServiceTest extends TestCase {
    
      public void testSubmit() throws Exception {
        /*
         * Mostly just tests that TrustedListenableFutureTask are created and run; tests for
         * TrustedListenableFutureTask should ensure that listeners are called correctly.
         */
    
        TestListeningExecutorService e = new TestListeningExecutorService();
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 3.2K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/util/concurrent/TrustedListenableFutureTaskTest.java

    import org.checkerframework.checker.nullness.qual.Nullable;
    
    /** Test case for {@link TrustedListenableFutureTask}. */
    @ElementTypesAreNonnullByDefault
    @GwtCompatible(emulated = true)
    public class TrustedListenableFutureTaskTest extends TestCase {
    
      public void testSuccessful() throws Exception {
        TrustedListenableFutureTask<Integer> task = TrustedListenableFutureTask.create(returning(2));
        assertFalse(task.isDone());
        task.run();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 15:41:36 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/util/concurrent/AbstractListeningExecutorService.java

      @CanIgnoreReturnValue // TODO(kak): consider removing this
      @Override
      protected final <T extends @Nullable Object> RunnableFuture<T> newTaskFor(
          Runnable runnable, @ParametricNullness T value) {
        return TrustedListenableFutureTask.create(runnable, value);
      }
    
      /**
       * @since 19.0 (present with return type {@code ListenableFutureTask} since 14.0)
       */
      @CanIgnoreReturnValue // TODO(kak): consider removing this
      @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri May 12 18:32:03 UTC 2023
    - 3K bytes
    - Viewed (0)
  5. guava/src/com/google/common/util/concurrent/AbstractListeningExecutorService.java

      @CanIgnoreReturnValue // TODO(kak): consider removing this
      @Override
      protected final <T extends @Nullable Object> RunnableFuture<T> newTaskFor(
          Runnable runnable, @ParametricNullness T value) {
        return TrustedListenableFutureTask.create(runnable, value);
      }
    
      /**
       * @since 19.0 (present with return type {@code ListenableFutureTask} since 14.0)
       */
      @CanIgnoreReturnValue // TODO(kak): consider removing this
      @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri May 12 18:32:03 UTC 2023
    - 3K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/util/concurrent/Futures.java

          ScheduledExecutorService executorService) {
        TrustedListenableFutureTask<O> task = TrustedListenableFutureTask.create(callable);
        Future<?> scheduled = executorService.schedule(task, delay, timeUnit);
        /*
         * Even when the user interrupts the task, we pass `false` to `cancel` so that we don't
         * interrupt a second time after the interruption performed by TrustedListenableFutureTask.
         */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 13:13:32 UTC 2024
    - 64.7K bytes
    - Viewed (0)
  7. guava/src/com/google/common/util/concurrent/Futures.java

          ScheduledExecutorService executorService) {
        TrustedListenableFutureTask<O> task = TrustedListenableFutureTask.create(callable);
        Future<?> scheduled = executorService.schedule(task, delay, timeUnit);
        /*
         * Even when the user interrupts the task, we pass `false` to `cancel` so that we don't
         * interrupt a second time after the interruption performed by TrustedListenableFutureTask.
         */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 13:13:32 UTC 2024
    - 64.4K bytes
    - Viewed (0)
  8. guava/src/com/google/common/util/concurrent/MoreExecutors.java

          this.delegate = checkNotNull(delegate);
        }
    
        @Override
        public ListenableScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit) {
          TrustedListenableFutureTask<@Nullable Void> task =
              TrustedListenableFutureTask.create(command, null);
          ScheduledFuture<?> scheduled = delegate.schedule(task, delay, unit);
          return new ListenableScheduledTask<@Nullable Void>(task, scheduled);
        }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:51:36 UTC 2024
    - 44.1K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java

        List<Future<String>> results;
    
        results = service.invokeAll(callables);
        assertThat(getOnlyElement(results)).isInstanceOf(TrustedListenableFutureTask.class);
    
        results = service.invokeAll(callables, 1, SECONDS);
        assertThat(getOnlyElement(results)).isInstanceOf(TrustedListenableFutureTask.class);
    
        /*
         * TODO(cpovirk): move ForwardingTestCase somewhere common, and use it to
         * test the forwarded methods
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 28.1K bytes
    - Viewed (0)
  10. guava/src/com/google/common/util/concurrent/ExecutionSequencer.java

        ListenableFuture<@Nullable Void> oldFuture = ref.getAndSet(newFuture);
    
        // Invoke our task once the previous future completes.
        TrustedListenableFutureTask<T> taskFuture = TrustedListenableFutureTask.create(task);
        oldFuture.addListener(taskFuture, taskExecutor);
    
        ListenableFuture<T> outputFuture = Futures.nonCancellationPropagating(taskFuture);
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 01 21:46:34 UTC 2024
    - 22.1K bytes
    - Viewed (0)
Back to top