Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 137 for succeed (0.14 sec)

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

        SettableFuture<String> future = SettableFuture.create();
        future.set(RESULT);
        /*
         * getUninterruptibly should call the timed get method once with a
         * wait of 0 seconds (and it should succeed, since the result is already
         * available).
         */
        assertEquals(RESULT, getUninterruptibly(future, 0, SECONDS));
      }
    
      public void testMakeUninterruptible_timedGetNegativeTimeoutAttempted()
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 9.1K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/util/concurrent/UninterruptibleFutureTest.java

        SettableFuture<String> future = SettableFuture.create();
        future.set(RESULT);
        /*
         * getUninterruptibly should call the timed get method once with a
         * wait of 0 seconds (and it should succeed, since the result is already
         * available).
         */
        assertEquals(RESULT, getUninterruptibly(future, 0, SECONDS));
      }
    
      public void testMakeUninterruptible_timedGetNegativeTimeoutAttempted()
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 9.1K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. guava-tests/test/com/google/common/graph/NetworkMutationTest.java

          }
          ArrayList<Integer> nodeList = new ArrayList<>(network.nodes());
          for (int i = 0; i < NUM_EDGES; ++i) {
            // Parallel edges are allowed, so this should always succeed.
            assertThat(
                    network.addEdge(
                        getRandomElement(nodeList, gen), getRandomElement(nodeList, gen), new Object()))
                .isTrue();
          }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 10 19:42:18 GMT 2024
    - 4.5K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/util/concurrent/Callables.java

      @J2ktIncompatible
      @GwtIncompatible // threads
      private static boolean trySetName(String threadName, Thread currentThread) {
        /*
         * setName should usually succeed, but the security manager can prohibit it. Is there a way to
         * see if we have the modifyThread permission without catching an exception?
         */
        try {
          currentThread.setName(threadName);
          return true;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri May 12 18:32:03 GMT 2023
    - 4.4K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/graph/NetworkMutationTest.java

          }
          ArrayList<Integer> nodeList = new ArrayList<>(network.nodes());
          for (int i = 0; i < NUM_EDGES; ++i) {
            // Parallel edges are allowed, so this should always succeed.
            assertThat(
                    network.addEdge(
                        getRandomElement(nodeList, gen), getRandomElement(nodeList, gen), new Object()))
                .isTrue();
          }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 10 19:42:18 GMT 2024
    - 4.5K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/util/concurrent/AtomicDoubleTest.java

          assertBitEquals(prev, at.get());
          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 May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 6.9K bytes
    - Viewed (0)
  9. 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)
  10. 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)
Back to top