Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 266 for QThread (0.21 sec)

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

        }
      }
    
      /** Wait for the given thread to reach the {@link State#TIMED_WAITING} thread state. */
      void awaitTimedWaiting(Thread thread) {
        while (true) {
          switch (thread.getState()) {
            case BLOCKED:
            case NEW:
            case RUNNABLE:
            case WAITING:
              Thread.yield();
              break;
            case TIMED_WAITING:
              return;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 28.2K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/util/concurrent/InterruptibleTask.java

      public final void run() {
        /*
         * Set runner thread before checking isDone(). If we were to check isDone() first, the task
         * 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();
    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. android/guava-tests/test/com/google/common/collect/SynchronizedNavigableMapTest.java

        @Override
        public boolean equals(@Nullable Object object) {
          assertTrue(Thread.holdsLock(mutex));
          return super.equals(object);
        }
    
        @Override
        public K getKey() {
          assertTrue(Thread.holdsLock(mutex));
          return super.getKey();
        }
    
        @Override
        public V getValue() {
          assertTrue(Thread.holdsLock(mutex));
          return super.getValue();
        }
    
        @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 12.2K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/util/concurrent/TestThread.java

      }
    
      /**
       * Causes this thread to call the named method, and asserts that this thread becomes blocked on
       * the lock-like object. The lock-like object must have a method equivalent to {@link
       * java.util.concurrent.locks.ReentrantLock#hasQueuedThread(Thread)}.
       */
      public void callAndAssertBlocks(String methodName, Object... arguments) throws Exception {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Apr 26 20:07:17 GMT 2023
    - 10.9K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/CycleDetectingLockFactoryTest.java

        LockingThread thread = new LockingThread(lockA);
        thread.start();
    
        thread.waitUntilHoldingLock();
        assertFalse(lockA.tryLock());
    
        thread.releaseLockAndFinish();
        assertTrue(lockA.tryLock());
      }
    
      public void testReentrantWriteLock_tryLock() throws Exception {
        LockingThread thread = new LockingThread(writeLockA);
        thread.start();
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 16.1K bytes
    - Viewed (1)
  6. guava-tests/test/com/google/common/base/SuppliersTest.java

                for (Thread thread : threads) {
                  if (isWaiting(thread)) {
                    waitingThreads++;
                  }
                }
                return waitingThreads;
              }
    
              @Override
              public Boolean get() {
                // Check that this method is called exactly once, by the first
                // thread to synchronize.
                long t0 = System.nanoTime();
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 18.1K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/base/SuppliersTest.java

                for (Thread thread : threads) {
                  if (isWaiting(thread)) {
                    waitingThreads++;
                  }
                }
                return waitingThreads;
              }
    
              @Override
              public Boolean get() {
                // Check that this method is called exactly once, by the first
                // thread to synchronize.
                long t0 = System.nanoTime();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 18.1K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

        Stopwatch stopwatch = Stopwatch.createStarted();
        Thread thread = new Thread(new JoinTarget(15));
        thread.start();
        thread.join();
        assertFalse(thread.isAlive());
    
        joinUninterruptibly(thread);
        joinUninterruptibly(thread, 0, MILLISECONDS);
        joinUninterruptibly(thread, -42, MILLISECONDS);
        joinUninterruptibly(thread, LONG_DELAY_MS, MILLISECONDS);
    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)
  9. okhttp/src/test/java/okhttp3/internal/http/CancelTest.kt

      private fun sleep(delayMillis: Int) {
        try {
          Thread.sleep(delayMillis.toLong())
        } catch (e: InterruptedException) {
          Thread.currentThread().interrupt()
        }
      }
    
      private fun cancelLater(
        call: Call,
        delayMillis: Int,
      ): CountDownLatch {
        val latch = CountDownLatch(1)
        Thread {
          sleep(delayMillis)
          if (cancelMode == CANCEL) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 9.9K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/util/concurrent/Uninterruptibles.java

            }
          }
        } finally {
          if (interrupted) {
            Thread.currentThread().interrupt();
          }
        }
      }
    
      /** Invokes {@code toJoin.}{@link Thread#join() join()} uninterruptibly. */
      @J2ktIncompatible
      @GwtIncompatible // concurrency
      public static void joinUninterruptibly(Thread toJoin) {
        boolean interrupted = false;
        try {
          while (true) {
            try {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 04 09:45:04 GMT 2023
    - 14.4K bytes
    - Viewed (0)
Back to top