Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for newStartedThread (0.23 sec)

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

        for (int i = 0; i < SIZE; i++) {
          aa.set(i, (double) COUNTDOWN);
        }
        Counter c1 = new Counter(aa);
        Counter c2 = new Counter(aa);
        Thread t1 = newStartedThread(c1);
        Thread t2 = newStartedThread(c2);
        awaitTermination(t1);
        awaitTermination(t2);
        assertEquals(SIZE * COUNTDOWN, c1.counts + c2.counts);
      }
    
      /** a deserialized serialized array holds same values */
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 10K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/AtomicDoubleArrayTest.java

        for (int i = 0; i < SIZE; i++) {
          aa.set(i, (double) COUNTDOWN);
        }
        Counter c1 = new Counter(aa);
        Counter c2 = new Counter(aa);
        Thread t1 = newStartedThread(c1);
        Thread t2 = newStartedThread(c2);
        awaitTermination(t1);
        awaitTermination(t2);
        assertEquals(SIZE * COUNTDOWN, c1.counts + c2.counts);
      }
    
      /** a deserialized serialized array holds same values */
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 14.5K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/util/concurrent/AtomicDoubleTest.java

      public void testCompareAndSetInMultipleThreads() throws Exception {
        final AtomicDouble at = new AtomicDouble(1.0);
        Thread t =
            newStartedThread(
                new CheckedRunnable() {
                  public void realRun() {
                    while (!at.compareAndSet(2.0, 3.0)) {
                      Thread.yield();
                    }
                  }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 6.9K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/util/concurrent/AtomicDoubleTest.java

      public void testCompareAndSetInMultipleThreads() throws Exception {
        final AtomicDouble at = new AtomicDouble(1.0);
        Thread t =
            newStartedThread(
                new CheckedRunnable() {
                  @Override
                  public void realRun() {
                    while (!at.compareAndSet(2.0, 3.0)) {
                      Thread.yield();
                    }
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 10.2K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java

       */
      long millisElapsedSince(long startNanoTime) {
        return NANOSECONDS.toMillis(System.nanoTime() - startNanoTime);
      }
    
      /** Returns a new started daemon Thread running the given runnable. */
      Thread newStartedThread(Runnable runnable) {
        Thread t = new Thread(runnable);
        t.setDaemon(true);
        t.start();
        return t;
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 37.2K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java

       */
      long millisElapsedSince(long startNanoTime) {
        return NANOSECONDS.toMillis(System.nanoTime() - startNanoTime);
      }
    
      /** Returns a new started daemon Thread running the given runnable. */
      Thread newStartedThread(Runnable runnable) {
        Thread t = new Thread(runnable);
        t.setDaemon(true);
        t.start();
        return t;
      }
    
      /**
    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)
Back to top