Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 81 - 90 of 501 for runnable (0.06 seconds)

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

    @GwtIncompatible
    @J2ktIncompatible
    final class InterruptionUtil {
      private static final Logger logger = Logger.getLogger(InterruptionUtil.class.getName());
    
      /** Runnable which will interrupt the target thread repeatedly when run. */
      private static final class Interruptenator implements Runnable {
        private final Thread interruptee;
        private volatile boolean shouldStop = false;
    
        Interruptenator(Thread interruptee) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Mar 17 15:38:30 GMT 2026
    - 3.4K bytes
    - Click Count (0)
  2. guava-testlib/test/com/google/common/collect/testing/FeatureSpecificTestSuiteBuilderTest.java

          return Collections.<Class<? extends AbstractTester>>singletonList(MyTester.class);
        }
      }
    
      public void testLifecycle() {
        boolean[] setUp = {false};
        Runnable setUpRunnable = () -> setUp[0] = true;
    
        boolean[] tearDown = {false};
        Runnable tearDownRunnable = () -> tearDown[0] = true;
    
        MyTestSuiteBuilder builder = new MyTestSuiteBuilder();
        Test test =
            builder
                .usingGenerator("yam")
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Mar 17 19:26:39 GMT 2026
    - 2.1K bytes
    - Click Count (0)
  3. okhttp/src/jvmTest/kotlin/okhttp3/internal/concurrent/TaskRunnerRealBackendTest.kt

      private val loggingUncaughtExceptionHandler =
        UncaughtExceptionHandler { _, throwable ->
          log.put("uncaught exception: $throwable")
        }
    
      private val threadFactory =
        ThreadFactory { runnable ->
          Thread(runnable, "TaskRunnerRealBackendTest").apply {
            isDaemon = true
            uncaughtExceptionHandler = loggingUncaughtExceptionHandler
          }
        }
    
      private val backend = TaskRunner.RealBackend(threadFactory)
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Fri Dec 27 13:39:56 GMT 2024
    - 3.5K bytes
    - Click Count (0)
  4. guava-tests/test/com/google/common/util/concurrent/JdkFutureAdaptersTest.java

                0,
                Integer.MAX_VALUE,
                60L,
                SECONDS,
                new SynchronousQueue<Runnable>(),
                new ThreadFactoryBuilder().setDaemon(true).build()) {
              @Override
              protected void beforeExecute(Thread t, Runnable r) {
                submitSuccessful.countDown();
              }
            };
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Mar 13 13:01:07 GMT 2026
    - 10K bytes
    - Click Count (0)
  5. android/guava/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)
  6. android/guava/src/com/google/common/util/concurrent/DirectExecutorService.java

       */
      @GuardedBy("lock")
      private int runningTasks = 0;
    
      @GuardedBy("lock")
      private boolean shutdown = false;
    
      @Override
      public void execute(Runnable command) {
        startTask();
        try {
          command.run();
        } finally {
          endTask();
        }
      }
    
      @Override
      public boolean isShutdown() {
        synchronized (lock) {
          return shutdown;
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Dec 16 14:23:59 GMT 2025
    - 3.4K bytes
    - Click Count (0)
  7. okhttp/src/jvmTest/kotlin/okhttp3/internal/connection/ConnectionPoolTest.kt

      }
    
      @Test fun interruptStopsThread() {
        val taskRunnerThreads = mutableListOf<Thread>()
        val taskRunner =
          TaskRunner(
            RealBackend { runnable ->
              Thread(runnable, "interruptStopsThread TaskRunner")
                .also { taskRunnerThreads += it }
            },
          )
    
        val pool =
          factory.newConnectionPool(
            taskRunner = taskRunner,
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Oct 07 21:55:03 GMT 2025
    - 8.2K bytes
    - Click Count (0)
  8. android/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)
  9. cycle_suppress_list.txt

    FIELD com.google.common.util.concurrent.AbstractFuture.Listener.executor com.google.common.util.concurrent.ExecutionSequencer.TaskNonReentrantExecutor
    
    # ***** FALSE POSITIVES *****
    
    # The Runnable type is so generic that it produces too many false positives.
    TYPE java.lang.Runnable
    
    FIELD com.google.common.base.Converter.reverse
    FIELD com.google.common.collect.AbstractBiMap.EntrySet.iterator.$.entry com.google.common.collect.AbstractBiMap.EntrySet.iterator.$.next.$
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Jul 24 01:59:49 GMT 2025
    - 3.2K bytes
    - Click Count (0)
  10. android/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)
Back to Top