Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 148 for interrupt (0.1 sec)

  1. okhttp/src/test/java/okhttp3/internal/http/CancelTest.kt

          Thread.currentThread().interrupt()
        }
      }
    
      private fun cancelLater(
        call: Call,
        delayMillis: Int,
      ): CountDownLatch {
        val latch = CountDownLatch(1)
        Thread {
          sleep(delayMillis)
          if (cancelMode == CANCEL) {
            call.cancel()
          } else {
            threadToCancel!!.interrupt()
          }
          latch.countDown()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/internal/http/ThreadInterruptTest.kt

          Thread.sleep(delayMillis.toLong())
        } catch (e: InterruptedException) {
          Thread.currentThread().interrupt()
        }
      }
    
      private fun interruptLater(delayMillis: Int) {
        val toInterrupt = Thread.currentThread()
        val interruptingCow =
          Thread {
            sleep(delayMillis)
            toInterrupt.interrupt()
          }
        interruptingCow.start()
      }
    
      companion object {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/util/concurrent/GeneratedMonitorTest.java

              TimeoutsToUse.PAST,
              // prefer responding to interrupt over timing out
              isInterruptible(method) ? Outcome.INTERRUPT : Outcome.FAILURE);
          addTests(
              suite,
              method,
              Scenario.UNSATISFIED_AND_INTERRUPTED_BEFORE_WAITING,
              TimeoutsToUse.SMALL,
              isInterruptible(method) ? Outcome.INTERRUPT : Outcome.FAILURE);
          addTests(
              suite,
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:18:12 UTC 2024
    - 27.1K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/SequentialExecutorTest.java

        // Run a task on the composed Executor that interrupts its thread (i.e. this thread).
        fakePool.execute(
            new Runnable() {
              @Override
              public void run() {
                Thread.currentThread().interrupt();
              }
            });
        // Run a task that expects that it is not interrupted while it is running.
        e.execute(
            new Runnable() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 11.4K bytes
    - Viewed (0)
  5. android/guava-testlib/test/com/google/common/testing/GcFinalizationTest.java

      // Test that interrupts result in RuntimeException, not InterruptedException.
      // Trickier than it looks, because runFinalization swallows interrupts.
      // ----------------------------------------------------------------
    
      class Interruptenator extends Thread {
        final AtomicBoolean shutdown;
    
        Interruptenator(final Thread interruptee) {
          this(interruptee, new AtomicBoolean(false));
        }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 02:42:09 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  6. fess-crawler/src/main/java/org/codelibs/fess/crawler/client/AccessTimeoutTarget.java

        public void expired() {
            int count = 0;
            while (running.get() && count < MAX_LOOP_COUNT) {
                if (logger.isDebugEnabled()) {
                    logger.debug("Interrupt {}", runningThread);
                }
                runningThread.interrupt();
                ThreadUtil.sleepQuietly(1000L);
                count++;
            }
        }
    
        public void stop() {
            running.set(false);
        }
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Thu Feb 22 01:36:27 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/FuturesGetUncheckedTest.java

      }
    
      @J2ktIncompatible
      @GwtIncompatible // Thread.interrupt
      public void testGetUnchecked_interrupted() {
        Thread.currentThread().interrupt();
        try {
          assertEquals("foo", getUnchecked(immediateFuture("foo")));
          assertTrue(Thread.currentThread().isInterrupted());
        } finally {
          Thread.interrupted();
        }
      }
    
      public void testGetUnchecked_cancelled() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 15:41:36 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/util/concurrent/FuturesGetUncheckedTest.java

      }
    
      @J2ktIncompatible
      @GwtIncompatible // Thread.interrupt
      public void testGetUnchecked_interrupted() {
        Thread.currentThread().interrupt();
        try {
          assertEquals("foo", getUnchecked(immediateFuture("foo")));
          assertTrue(Thread.currentThread().isInterrupted());
        } finally {
          Thread.interrupted();
        }
      }
    
      public void testGetUnchecked_cancelled() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 15:41:36 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/util/concurrent/GeneratedMonitorTest.java

              TimeoutsToUse.PAST,
              // prefer responding to interrupt over timing out
              isInterruptible(method) ? Outcome.INTERRUPT : Outcome.FAILURE);
          addTests(
              suite,
              method,
              Scenario.UNSATISFIED_AND_INTERRUPTED_BEFORE_WAITING,
              TimeoutsToUse.SMALL,
              isInterruptible(method) ? Outcome.INTERRUPT : Outcome.FAILURE);
          addTests(
              suite,
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:51:36 UTC 2024
    - 27.1K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/util/concurrent/SequentialExecutorTest.java

        // Run a task on the composed Executor that interrupts its thread (i.e. this thread).
        fakePool.execute(
            new Runnable() {
              @Override
              public void run() {
                Thread.currentThread().interrupt();
              }
            });
        // Run a task that expects that it is not interrupted while it is running.
        e.execute(
            new Runnable() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 11.4K bytes
    - Viewed (0)
Back to top