Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 69 for directExecutor (0.21 sec)

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

     * execute}.
     */
    @GwtCompatible
    @ElementTypesAreNonnullByDefault
    enum DirectExecutor implements Executor {
      INSTANCE;
    
      @Override
      public void execute(Runnable command) {
        command.run();
      }
    
      @Override
      public String toString() {
        return "MoreExecutors.directExecutor()";
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 05 22:27:35 GMT 2021
    - 1.1K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/util/concurrent/FuturesTest.java

          ListenableFuture<Object> unused = transform(root, identity(), directExecutor());
          root.set("foo");
        }
    
        SettableFuture<Object> root = SettableFuture.create();
        ListenableFuture<Object> output = root;
        for (int i = 0; i < 10000; i++) {
          output = transform(output, identity(), directExecutor());
        }
        try {
          root.set("foo");
          fail();
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 144.5K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java

                  }
                },
                directExecutor()));
        thingToCancel[0] = serializer.submit(Callables.returning(null), directExecutor());
        results.add(thingToCancel[0]);
        // Enqueue more than enough tasks to force reentrancy.
        for (int i = 0; i < 5; i++) {
          results.add(serializer.submit(Callables.returning(null), directExecutor()));
        }
    
        manualExecutorTask[0].run();
    
    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)
  4. android/guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java

                  }
                },
                directExecutor()));
        thingToCancel[0] = serializer.submit(Callables.returning(null), directExecutor());
        results.add(thingToCancel[0]);
        // Enqueue more than enough tasks to force reentrancy.
        for (int i = 0; i < 5; i++) {
          results.add(serializer.submit(Callables.returning(null), directExecutor()));
        }
    
        manualExecutorTask[0].run();
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 16.8K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/util/concurrent/FluentFutureTest.java

    import static com.google.common.util.concurrent.Futures.immediateFailedFuture;
    import static com.google.common.util.concurrent.Futures.immediateFuture;
    import static com.google.common.util.concurrent.MoreExecutors.directExecutor;
    import static java.util.concurrent.Executors.newScheduledThreadPool;
    import static java.util.concurrent.TimeUnit.SECONDS;
    import static org.junit.Assert.assertThrows;
    
    import com.google.common.annotations.GwtCompatible;
    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)
  6. guava-tests/test/com/google/common/util/concurrent/AbstractAbstractFutureTest.java

        future.addListener(before, directExecutor());
        future.addListener(bad, directExecutor());
        future.addListener(after, directExecutor());
    
        future.set(1); // BadRunnableException must not propagate.
    
        before.assertRun();
        after.assertRun();
      }
    
      public void testNullListener() {
        try {
          future.addListener(null, directExecutor());
          fail();
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 15.5K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/util/concurrent/FutureCallbackTest.java

              }
            };
        addCallback(f, callback, directExecutor());
        f.cancel(true);
      }
    
      public void testThrowErrorFromGet() {
        Error error = new AssertionError("ASSERT!");
        ListenableFuture<String> f = UncheckedThrowingFuture.throwingError(error);
        MockCallback callback = new MockCallback(error);
        addCallback(f, callback, directExecutor());
      }
    
      public void testRuntimeExceptionFromGet() {
    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)
  8. guava-tests/test/com/google/common/util/concurrent/ExecutionListTest.java

        @Override
        public void run() {
          countDownLatch.countDown();
        }
      }
    
      public void testExceptionsCaught() {
        list.add(THROWING_RUNNABLE, directExecutor());
        list.execute();
        list.add(THROWING_RUNNABLE, directExecutor());
      }
    
      public void testNulls() {
        new NullPointerTester().testAllPublicInstanceMethods(new ExecutionList());
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 4.7K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/util/concurrent/AbstractAbstractFutureTest.java

        future.addListener(before, directExecutor());
        future.addListener(bad, directExecutor());
        future.addListener(after, directExecutor());
    
        future.set(1); // BadRunnableException must not propagate.
    
        before.assertRun();
        after.assertRun();
      }
    
      public void testNullListener() {
        try {
          future.addListener(null, directExecutor());
          fail();
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 15.5K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/util/concurrent/ServiceManagerTest.java

    import static com.google.common.base.StandardSystemProperty.OS_NAME;
    import static com.google.common.truth.Truth.assertThat;
    import static com.google.common.util.concurrent.MoreExecutors.directExecutor;
    import static java.util.Arrays.asList;
    import static java.util.concurrent.TimeUnit.SECONDS;
    import static org.junit.Assert.assertThrows;
    
    import com.google.common.collect.ImmutableMap;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Oct 02 17:20:27 GMT 2023
    - 23.2K bytes
    - Viewed (0)
Back to top