Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 14 of 14 for Sleep (0.12 sec)

  1. guava-tests/test/com/google/common/cache/CacheReferencesTest.java

        for (int i = 0; i < 500; i++) {
          System.gc();
    
          CacheTesting.drainReferenceQueues(cache);
          if (cache.size() == 1) {
            break;
          }
          try {
            Thread.sleep(10);
          } catch (InterruptedException e) {
            /* ignore */
          }
          try {
            // Fill up heap so soft references get cleared.
            filler = new byte[Math.max(filler.length, filler.length * 2)];
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 6.1K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/InterruptibleTaskTest.java

        while (!isThreadBlockedOnInstanceOf(t, blocker)) {
          if (t.getState() == Thread.State.TERMINATED) {
            throw new RuntimeException("Thread " + t + " exited unexpectedly");
          }
          Thread.sleep(1);
        }
      }
    
      private static boolean isThreadBlockedOnInstanceOf(Thread t, Class<?> blocker) {
        return t.getState() == Thread.State.WAITING && blocker.isInstance(LockSupport.getBlocker(t));
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.6K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/util/concurrent/InterruptionUtil.java

          this.everyMillis = everyMillis;
          this.interruptee = interruptee;
        }
    
        @Override
        public void run() {
          while (true) {
            try {
              Thread.sleep(everyMillis);
            } catch (InterruptedException e) {
              // ok. just stop sleeping.
            }
            if (shouldStop) {
              break;
            }
            interruptee.interrupt();
          }
        }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4.4K bytes
    - Viewed (0)
  4. guava-testlib/test/com/google/common/util/concurrent/testing/TestingExecutorsTest.java

              public void run() {
                taskDone = true;
              }
            };
        ScheduledFuture<?> future =
            TestingExecutors.noOpScheduledExecutor().schedule(task, 10, TimeUnit.MILLISECONDS);
        Thread.sleep(20);
        assertFalse(taskDone);
        assertFalse(future.isDone());
      }
    
      public void testNoOpScheduledExecutorShutdown() {
        ListeningScheduledExecutorService executor = TestingExecutors.noOpScheduledExecutor();
    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)
Back to top