Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 170 for interrupt (0.2 sec)

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

       * Thread#join(long)}), else interrupts the thread (in the hope that it may terminate later) and
       * fails.
       */
      void awaitTermination(Thread t, long timeoutMillis) {
        try {
          t.join(timeoutMillis);
        } catch (InterruptedException ie) {
          threadUnexpectedException(ie);
        } finally {
          if (t.getState() != Thread.State.TERMINATED) {
            t.interrupt();
            fail("Test timed out");
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 37.7K bytes
    - Viewed (0)
  2. guava-tests/benchmark/com/google/common/util/concurrent/MoreExecutorsDirectExecutorBenchmark.java

                }
              };
          threads.add(thread);
        }
      }
    
      @AfterExperiment
      void after() {
        for (Thread thread : threads) {
          thread.interrupt(); // try to get them to exit
        }
        threads.clear();
      }
    
      @Footprint
      Object measureSize() {
        return executor;
      }
    
      @Benchmark
      int timeUncontendedExecute(int reps) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.4K bytes
    - Viewed (0)
  3. android/guava-tests/benchmark/com/google/common/util/concurrent/MoreExecutorsDirectExecutorBenchmark.java

                }
              };
          threads.add(thread);
        }
      }
    
      @AfterExperiment
      void after() {
        for (Thread thread : threads) {
          thread.interrupt(); // try to get them to exit
        }
        threads.clear();
      }
    
      @Footprint
      Object measureSize() {
        return executor;
      }
    
      @Benchmark
      int timeUncontendedExecute(int reps) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.4K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/FuturesTest.java

                inFunction.countDown();
                try {
                  new CountDownLatch(1).await(); // wait for interrupt
                } catch (InterruptedException expected) {
                  // Ensure the thread's interrupt status is preserved.
                  Thread.currentThread().interrupt();
                  gotException.countDown();
                }
              }
            };
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 144.5K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/util/concurrent/AbstractServiceTest.java

        currentThread().interrupt();
        try {
          service.startAsync().awaitRunning();
          assertEquals(State.RUNNING, service.state());
    
          service.stopAsync().awaitTerminated();
          assertEquals(State.TERMINATED, service.state());
    
          assertTrue(currentThread().isInterrupted());
        } finally {
          Thread.interrupted(); // clear interrupt for future tests
        }
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 29.3K bytes
    - Viewed (0)
  6. guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/AbstractFuture.java

            // don't copy the mayInterruptIfRunning bit, for consistency with the server, to ensure that
            // interruptTask() is called if and only if the bit is true and because we cannot infer the
            // interrupt status from non AbstractFuture futures.
            state = other.state;
    
            notifyAndClearListeners();
            return;
          }
    
          /*
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Jan 22 19:37:41 GMT 2024
    - 12.3K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/internal/publicsuffix/PublicSuffixDatabaseTest.kt

        }
      }
    
      @Test fun threadIsInterruptedOnFirstRead() {
        Thread.currentThread().interrupt()
        try {
          val result = publicSuffixDatabase.getEffectiveTldPlusOne("squareup.com")
          assertThat(result).isEqualTo("squareup.com")
        } finally {
          assertThat(Thread.interrupted()).isTrue()
        }
      }
    
      @Test fun secondReadFailsSameAsFirst() {
        val badPublicSuffixDatabase =
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java

       * Thread#join(long)}), else interrupts the thread (in the hope that it may terminate later) and
       * fails.
       */
      void awaitTermination(Thread t, long timeoutMillis) {
        try {
          t.join(timeoutMillis);
        } catch (InterruptedException ie) {
          threadUnexpectedException(ie);
        } finally {
          if (t.getState() != Thread.State.TERMINATED) {
            t.interrupt();
            fail("Test timed out");
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 37.2K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureCancellationCauseTest.java

      public void testSetFuture_misbehavingFutureDoesNotThrow() throws Exception {
        ListenableFuture<String> badFuture =
            new ListenableFuture<String>() {
              @Override
              public boolean cancel(boolean interrupt) {
                return false;
              }
    
              @Override
              public boolean isDone() {
                return true;
              }
    
              @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.1K bytes
    - Viewed (0)
  10. src/main/java/org/codelibs/fess/auth/chain/CommandChain.java

                throw new CommandExecutionException("Process terminated.", e);
            } finally {
                if (mt != null) {
                    mt.setFinished(true);
                    try {
                        mt.interrupt();
                    } catch (final Exception e) {
                        // ignore
                    }
                }
                if (currentProcess != null) {
                    try {
    Java
    - Registered: Mon May 06 08:04:11 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 9.3K bytes
    - Viewed (0)
Back to top