Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 91 - 100 of 501 for runnable (0.06 seconds)

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

      }
    
      public void testSubmit_runnable_completesAfterRun() throws Exception {
        List<Runnable> pendingRunnables = new ArrayList<>();
        List<Runnable> executedRunnables = new ArrayList<>();
        Runnable runnable =
            new Runnable() {
              @Override
              public void run() {
                executedRunnables.add(this);
              }
            };
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 134K bytes
    - Click Count (0)
  2. guava-tests/test/com/google/common/util/concurrent/ThreadFactoryBuilderTest.java

     *
     * @author Kurt Alfred Kluever
     * @author Martin Buchholz
     */
    @NullUnmarked
    @GwtIncompatible
    @J2ktIncompatible
    public class ThreadFactoryBuilderTest extends TestCase {
      private final Runnable monitoredRunnable = () -> completed = true;
    
      private static final UncaughtExceptionHandler UNCAUGHT_EXCEPTION_HANDLER =
          (thread, throwable) -> {};
    
      private ThreadFactoryBuilder builder;
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 7.8K bytes
    - Click Count (0)
  3. guava-tests/test/com/google/common/util/concurrent/AbstractAbstractFutureTest.java

        before.assertRun();
        inBetween.assertRun();
        after.assertRun();
      }
    
      public void testMisbehavingListenerAlreadyDone() {
        class BadRunnableException extends RuntimeException {}
    
        Runnable bad =
            () -> {
              throw new BadRunnableException();
            };
    
        future.set(1);
        future.addListener(bad, directExecutor()); // BadRunnableException must not propagate.
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 16.3K bytes
    - Click Count (0)
  4. android/guava/src/com/google/common/util/concurrent/ListeningExecutorService.java

       */
      @Override
      ListenableFuture<?> submit(Runnable task);
    
      /**
       * @return a {@code ListenableFuture} representing pending completion of the task
       * @throws RejectedExecutionException {@inheritDoc}
       */
      @Override
      <T extends @Nullable Object> ListenableFuture<T> submit(
          Runnable task, @ParametricNullness T result);
    
      /**
       * {@inheritDoc}
       *
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sun Dec 22 03:38:46 GMT 2024
    - 4.2K bytes
    - Click Count (0)
  5. guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java

        Logger.getLogger(AbstractFuture.class.getName()).addHandler(logHandler);
    
        List<Future<?>> results = new ArrayList<>();
        Runnable[] manualExecutorTask = new Runnable[1];
        Executor manualExecutor =
            new Executor() {
              @Override
              public void execute(Runnable task) {
                manualExecutorTask[0] = task;
              }
            };
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 13.6K bytes
    - Click Count (0)
  6. android/guava/src/com/google/common/util/concurrent/DirectExecutor.java

     * execute}.
     */
    @GwtCompatible
    enum DirectExecutor implements Executor {
      INSTANCE;
    
      @Override
      public void execute(Runnable command) {
        command.run();
      }
    
      @Override
      public String toString() {
        return "MoreExecutors.directExecutor()";
      }
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sat Dec 21 03:10:51 GMT 2024
    - 1.1K bytes
    - Click Count (0)
  7. src/main/java/org/codelibs/core/concurrent/CommonPoolUtil.java

            // nothing
        }
    
        /**
         * Executes the given task in the common ForkJoinPool.
         *
         * @param task
         *            the task to execute
         */
        public static void execute(final Runnable task) {
            ForkJoinPool.commonPool().execute(() -> {
                final Thread currentThread = Thread.currentThread();
                final ClassLoader orignal = currentThread.getContextClassLoader();
    Created: Fri Apr 03 20:58:12 GMT 2026
    - Last Modified: Thu Jul 31 08:16:49 GMT 2025
    - 1.7K bytes
    - Click Count (0)
  8. futures/listenablefuture1/src/com/google/common/util/concurrent/ListenableFuture.java

     *
     * {@snippet :
     * final String name = ...;
     * inFlight.add(name);
     * ListenableFuture<Result> future = service.query(name);
     * future.addListener(new Runnable() {
     *   public void run() {
     *     processedCount.incrementAndGet();
     *     inFlight.remove(name);
     *     lastProcessed.set(name);
     *     logger.info("Done with {0}", name);
     *   }
     * }, executor);
     * }
     *
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Jan 29 22:14:05 GMT 2026
    - 8K bytes
    - Click Count (0)
  9. src/test/java/jcifs/smb1/smb1/TestLockingTest.java

            assertEquals(currentTime, t.ltime, "ltime should be mutable");
        }
    
        @Test
        @DisplayName("TestLocking implements Runnable")
        void testImplementsRunnable() {
            TestLocking t = new TestLocking();
            assertTrue(t instanceof Runnable, "TestLocking should implement Runnable");
        }
    
        @Test
        @DisplayName("run method handles null URL gracefully")
        void testRunWithNullUrl() {
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 9.9K bytes
    - Click Count (0)
  10. guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/InterruptibleTask.java

    import org.jspecify.annotations.Nullable;
    
    /** Emulation for InterruptibleTask in GWT. */
    abstract class InterruptibleTask<T extends @Nullable Object> implements Runnable {
    
      @Override
      public void run() {
        T result = null;
        Throwable error = null;
        if (isDone()) {
          return;
        }
        try {
          result = runInterruptibly();
        } catch (Throwable t) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sun Dec 22 03:38:46 GMT 2024
    - 1.6K bytes
    - Click Count (0)
Back to Top