Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for Zhang (0.15 sec)

  1. guava-testlib/test/com/google/common/util/concurrent/testing/TestingExecutorsTest.java

    import java.util.concurrent.Future;
    import java.util.concurrent.ScheduledFuture;
    import java.util.concurrent.TimeUnit;
    import junit.framework.TestCase;
    
    /**
     * Tests for TestingExecutors.
     *
     * @author Eric Chang
     */
    public class TestingExecutorsTest extends TestCase {
      private volatile boolean taskDone;
    
      public void testNoOpScheduledExecutor() throws InterruptedException {
        taskDone = false;
        Runnable task =
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.7K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/GeneratedMonitorTest.java

        long hangDelayMillis =
            (expectedOutcome == Outcome.HANG)
                ? EXPECTED_HANG_DELAY_MILLIS
                : UNEXPECTED_HANG_DELAY_MILLIS;
        boolean hung =
            !awaitUninterruptibly(callCompletedLatch, hangDelayMillis, TimeUnit.MILLISECONDS);
        if (hung) {
          assertEquals(expectedOutcome, Outcome.HANG);
        } else {
          assertNull(task.get(UNEXPECTED_HANG_DELAY_MILLIS, TimeUnit.MILLISECONDS));
        }
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Apr 17 14:48:57 GMT 2023
    - 27.4K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/util/concurrent/MoreExecutors.java

       * @param terminationTimeout how long to wait for the executor to finish before terminating the
       *     JVM
       * @param timeUnit unit of time for the time parameter
       * @return an unmodifiable version of the input which will not hang the JVM
       */
      @J2ktIncompatible
      @GwtIncompatible // TODO
      @SuppressWarnings("GoodTime") // should accept a java.time.Duration
      public static ExecutorService getExitingExecutorService(
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 17 16:33:44 GMT 2024
    - 41.8K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/FuturesTest.java

            }
          }
        }
      }
    
      /**
       * Call the non-timed {@link Future#get()} in a way that allows us to abort if it's expected to
       * hang forever. More precisely, if it's expected to return, we simply call it[*], but if it's
       * expected to hang (because one of the input futures that we know makes it up isn't done yet),
       * then we call it in a separate thread (using pseudoTimedGet). The result is that we wait as long
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 144.5K bytes
    - Viewed (0)
  5. android/guava-testlib/test/com/google/common/util/concurrent/testing/TestingExecutorsTest.java

    import java.util.concurrent.Future;
    import java.util.concurrent.ScheduledFuture;
    import java.util.concurrent.TimeUnit;
    import junit.framework.TestCase;
    
    /**
     * Tests for TestingExecutors.
     *
     * @author Eric Chang
     */
    public class TestingExecutorsTest extends TestCase {
      private volatile boolean taskDone;
    
      public void testNoOpScheduledExecutor() throws InterruptedException {
        taskDone = false;
        Runnable task =
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.7K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/util/concurrent/AbstractTransformFuture.java

         * this is no worse than what FutureTask does in that situation. Additionally, because the
         * Future was cancelled, its listeners have been run, so its consumers will not hang.
         *
         * Contrast this to the situation we have if setResult() throws, a situation described below.
         */
        I sourceResult;
        try {
          sourceResult = getDone(localInputFuture);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Feb 01 21:46:34 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/util/concurrent/FuturesTest.java

            }
          }
        }
      }
    
      /**
       * Call the non-timed {@link Future#get()} in a way that allows us to abort if it's expected to
       * hang forever. More precisely, if it's expected to return, we simply call it[*], but if it's
       * expected to hang (because one of the input futures that we know makes it up isn't done yet),
       * then we call it in a separate thread (using pseudoTimedGet). The result is that we wait as long
    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)
  8. android/guava-tests/test/com/google/common/util/concurrent/GeneratedMonitorTest.java

        long hangDelayMillis =
            (expectedOutcome == Outcome.HANG)
                ? EXPECTED_HANG_DELAY_MILLIS
                : UNEXPECTED_HANG_DELAY_MILLIS;
        boolean hung =
            !awaitUninterruptibly(callCompletedLatch, hangDelayMillis, TimeUnit.MILLISECONDS);
        if (hung) {
          assertEquals(expectedOutcome, Outcome.HANG);
        } else {
          assertNull(task.get(UNEXPECTED_HANG_DELAY_MILLIS, TimeUnit.MILLISECONDS));
        }
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Apr 17 14:48:57 GMT 2023
    - 26.1K bytes
    - Viewed (0)
Back to top