Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 25 for Sait (0.15 sec)

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

          }
          barrier.await(); // release the threads!
          barrier.await(); // wait for them all to complete
          assertEquals(1, task.get().intValue());
          assertEquals(1, counter.get());
        }
        executor.shutdown();
      }
    
      @J2ktIncompatible
      @GwtIncompatible // blocking wait
      public void testToString() throws Exception {
        final CountDownLatch enterLatch = new CountDownLatch(1);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/util/concurrent/Monitor.java

     *     while (value == null) {
     *       wait();
     *     }
     *     V result = value;
     *     value = null;
     *     notifyAll();
     *     return result;
     *   }
     *
     *   public synchronized void set(V newValue) throws InterruptedException {
     *     while (value != null) {
     *       wait();
     *     }
     *     value = newValue;
     *     notifyAll();
     *   }
     * }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 18:22:01 GMT 2023
    - 38.6K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/util/concurrent/AbstractAbstractFutureTest.java

        long nanosPerSecond = NANOSECONDS.convert(1, SECONDS);
        assertThat(nanosPerSecond * Long.MAX_VALUE).isLessThan(0L);
    
        // Check that we wait long enough anyway (presumably as long as MAX_VALUE nanos):
        TimedWaiterThread waiter = new TimedWaiterThread(future, Long.MAX_VALUE, SECONDS);
        waiter.start();
        waiter.awaitWaiting();
    
        future.set(1);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 15.5K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java

          afe.initCause(ie);
          throw afe;
        }
      }
    
      /**
       * Spin-waits up to the specified number of milliseconds for the given thread to enter a wait
       * state: BLOCKED, WAITING, or TIMED_WAITING.
       */
      void waitForThreadToEnterWaitState(Thread thread, long timeoutMillis) {
        long startTime = System.nanoTime();
        for (; ; ) {
    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)
  5. android/guava-tests/test/com/google/common/util/concurrent/AbstractAbstractFutureTest.java

        long nanosPerSecond = NANOSECONDS.convert(1, SECONDS);
        assertThat(nanosPerSecond * Long.MAX_VALUE).isLessThan(0L);
    
        // Check that we wait long enough anyway (presumably as long as MAX_VALUE nanos):
        TimedWaiterThread waiter = new TimedWaiterThread(future, Long.MAX_VALUE, SECONDS);
        waiter.start();
        waiter.awaitWaiting();
    
        future.set(1);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 15.5K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/util/concurrent/AbstractFuture.java

                  if (remainingNanos < SPIN_THRESHOLD_NANOS) {
                    // Remove the waiter, one way or another we are done parking this thread.
                    removeWaiter(node);
                    break long_wait_loop; // jump down to the busy wait loop
                  }
                }
              }
              oldHead = waiters; // re-read and loop.
            } while (oldHead != Waiter.TOMBSTONE);
          }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 22 21:17:24 GMT 2024
    - 63K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java

          afe.initCause(ie);
          throw afe;
        }
      }
    
      /**
       * Spin-waits up to the specified number of milliseconds for the given thread to enter a wait
       * state: BLOCKED, WAITING, or TIMED_WAITING.
       */
      void waitForThreadToEnterWaitState(Thread thread, long timeoutMillis) {
        long startTime = System.nanoTime();
        for (; ; ) {
    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)
  8. guava-tests/test/com/google/common/util/concurrent/FuturesTest.java

        // Once the backing futures are done there's a (brief) moment where we know nothing
        assertThat(futureResult.toString()).matches("CombinedFuture@\\w+\\[status=PENDING]");
        callableBlocking.countDown();
        // Need to wait for resultFuture to be returned.
        assertTrue(executor.awaitTermination(10, SECONDS));
        // But once the async function has returned a future we can include that in the toString
        assertThat(futureResult.toString())
    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)
  9. android/guava/src/com/google/common/collect/ConcurrentHashMultiset.java

              }
            } else {
              // In the case of a concurrent remove, we might observe a zero value, which means another
              // thread is about to remove (element, existingCounter) from the map. Rather than wait,
              // we can just do that work here.
              AtomicInteger newCounter = new AtomicInteger(occurrences);
              if ((countMap.putIfAbsent(element, newCounter) == null)
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 20.9K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java

              }
            };
        assertThat(testFuture.toString())
            .matches("[^\\[]+\\[status=SUCCESS, result=\\[java.lang.Boolean@\\w+\\]\\]");
      }
    
      /**
       * This test attempts to cause a future to wait for longer than it was requested to from a timed
       * get() call. As measurements of time are prone to flakiness, it tries to assert based on ranges
       * derived from observing how much time actually passed for various operations.
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 46.8K bytes
    - Viewed (0)
Back to top