Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 58 for succeed (0.17 sec)

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

            assertTrue(aa.compareAndSet(i, prev, x));
            assertBitEquals(x, aa.get(i));
            prev = x;
          }
        }
      }
    
      /** compareAndSet in one thread enables another waiting for value to succeed */
      public void testCompareAndSetInMultipleThreads() throws InterruptedException {
        final AtomicDoubleArray a = new AtomicDoubleArray(1);
        a.set(0, 1.0);
        Thread t =
            newStartedThread(
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 10K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/util/concurrent/InterruptibleTask.java

         * might be cancelled before we set the runner thread. That would make it impossible to
         * interrupt, yet it will still run, since interruptTask will leave the runner value null,
         * allowing the CAS below to succeed.
         */
        Thread currentThread = Thread.currentThread();
        if (!compareAndSet(null, currentThread)) {
          return; // someone else has run or is running.
        }
    
        boolean run = !isDone();
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Sep 29 21:34:48 GMT 2023
    - 9.9K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/util/concurrent/AtomicDoubleArrayTest.java

            assertTrue(aa.compareAndSet(i, prev, x));
            assertBitEquals(x, aa.get(i));
            prev = x;
          }
        }
      }
    
      /** compareAndSet in one thread enables another waiting for value to succeed */
      public void testCompareAndSetInMultipleThreads() throws InterruptedException {
        final AtomicDoubleArray a = new AtomicDoubleArray(1);
        a.set(0, 1.0);
        Thread t =
            newStartedThread(
    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)
  4. guava-tests/test/com/google/common/util/concurrent/AtomicDoubleTest.java

          assertTrue(at.compareAndSet(prev, x));
          assertBitEquals(x, at.get());
          prev = x;
        }
      }
    
      /** compareAndSet in one thread enables another waiting for value to succeed */
      public void testCompareAndSetInMultipleThreads() throws Exception {
        final AtomicDouble at = new AtomicDouble(1.0);
        Thread t =
            newStartedThread(
                new CheckedRunnable() {
    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. guava-tests/test/com/google/common/util/concurrent/CycleDetectingLockFactoryTest.java

        // lockD -> lockA
        lockD.lock();
        lockA.lock();
        lockA.unlock();
        lockD.unlock();
    
        // lockA -> lockD should warn but otherwise succeed because lockD was
        // created by a factory with the WARN policy.
        lockA.lock();
        lockD.lock();
      }
    
      public void testReentrantLock_tryLock() throws Exception {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 16.1K bytes
    - Viewed (0)
  6. guava-testlib/src/com/google/common/collect/testing/google/AbstractMultisetSetCountTester.java

       * is permitted and similarly for decrease/remove(). We assume that a
       * setCount() no-op is permitted if either add() or remove() is permitted,
       * though we also allow it to "succeed" if neither is permitted.
       */
    
      private void assertSetCount(E element, int count) {
        setCountCheckReturnValue(element, count);
    
        assertEquals(
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 13.4K bytes
    - Viewed (0)
  7. android/guava-testlib/src/com/google/common/collect/testing/google/AbstractMultisetSetCountTester.java

       * is permitted and similarly for decrease/remove(). We assume that a
       * setCount() no-op is permitted if either add() or remove() is permitted,
       * though we also allow it to "succeed" if neither is permitted.
       */
    
      private void assertSetCount(E element, int count) {
        setCountCheckReturnValue(element, count);
    
        assertEquals(
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 13.4K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/util/concurrent/AtomicLongMap.java

          long oldValue = atomic.get();
          if (oldValue == 0L || atomic.compareAndSet(oldValue, 0L)) {
            // only remove after setting to zero, to avoid concurrent updates
            map.remove(key, atomic);
            // succeed even if the remove fails, since the value was already adjusted
            return oldValue;
          }
        }
      }
    
      /**
       * If {@code (key, value)} is currently in the map, this method removes it and returns true;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 14.1K bytes
    - Viewed (0)
  9. guava-testlib/test/com/google/common/testing/NullPointerTesterTest.java

          }
        }
      }
    
      /*
       * This next part consists of several sample classes that provide
       * demonstrations of conditions that cause NullPointerTester
       * to succeed/fail.
       */
    
      /** Lots of well-behaved methods. */
      @SuppressWarnings("unused") // used by reflection
      private static class PassObject extends SomeClassThatDoesNotUseNullable {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Nov 16 15:12:31 GMT 2023
    - 47.9K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

      private static final class TimedPutQueue {
        final BlockingQueue<String> queue;
        final Completion completed;
    
        /**
         * Creates a {@link EnableWrites} which open up a spot for a {@code put} to succeed in {@code
         * countdownInMillis}.
         */
        static TimedPutQueue createWithDelay(long countdownInMillis) {
          return new TimedPutQueue(countdownInMillis);
        }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 31.7K bytes
    - Viewed (0)
Back to top