Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 115 for interrupt (0.23 sec)

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

        assertEquals("foo", getChecked(immediateFuture("foo"), TwoArgConstructorException.class));
      }
    
      public void testGetCheckedUntimed_interrupted() {
        SettableFuture<String> future = SettableFuture.create();
        Thread.currentThread().interrupt();
        try {
          getChecked(future, TwoArgConstructorException.class);
          fail();
        } catch (TwoArgConstructorException expected) {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 16.4K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. android/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 May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 29.3K bytes
    - Viewed (0)
  5. src/test/java/jcifs/tests/ConcurrencyTest.java

                    try {
                        synchronized ( lock ) {
                            lock.wait(1000);
                        }
    
                        Thread.sleep(100);
                        t.interrupt();
                    }
                    catch ( InterruptedException e ) {
                        e.printStackTrace();
                    }
                }
            });
    
            try {
    Java
    - Registered: Sun May 05 00:10:10 GMT 2024
    - Last Modified: Sun Nov 14 17:40:50 GMT 2021
    - 17.6K bytes
    - Viewed (0)
  6. 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 Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 144.5K bytes
    - Viewed (0)
  7. src/main/java/org/codelibs/fess/ds/callback/FileListIndexUpdateCallbackImpl.java

                executor.awaitTermination(executorTerminationTimeout, TimeUnit.SECONDS);
            } catch (final InterruptedException e) {
                if (logger.isDebugEnabled()) {
                    logger.debug("Failed to interrupt executor.", e);
                }
            } finally {
                executor.shutdownNow();
            }
    
            if (!deleteUrlList.isEmpty()) {
                deleteDocuments();
            }
    Java
    - Registered: Mon May 06 08:04:11 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 16.8K bytes
    - Viewed (0)
  8. 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)
  9. src/main/java/org/codelibs/fess/thumbnail/impl/CommandGenerator.java

                }
    
                executed.set(true);
    
                if (logger.isDebugEnabled()) {
                    logger.debug("Interrupting a stream thread.");
                }
                ist.interrupt();
    
                CommonPoolUtil.execute(() -> {
                    try {
                        CloseableUtil.closeQuietly(p.getInputStream());
                    } catch (final Exception e) {
    Java
    - Registered: Mon May 06 08:04:11 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 9.6K bytes
    - Viewed (0)
  10. src/main/java/jcifs/util/transport/Transport.java

            Thread t = this.thread;
            if ( t != null && Thread.currentThread() != t ) {
                this.thread = null;
                try {
                    log.debug("Interrupting transport thread");
                    t.interrupt();
                    log.debug("Joining transport thread");
                    t.join(timeout);
                    log.debug("Joined transport thread");
                }
                catch ( InterruptedException e ) {
    Java
    - Registered: Sun May 05 00:10:10 GMT 2024
    - Last Modified: Sun Nov 01 18:12:21 GMT 2020
    - 24.1K bytes
    - Viewed (0)
Back to top