Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 475 for Phread (0.17 sec)

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

              @Override
              public void run() {
                list.execute();
              }
            };
        Thread thread1 = new Thread(execute);
        Thread thread2 = new Thread(execute);
        thread1.start();
        thread2.start();
        assertEquals(0, runCalled.get());
        okayToRun.countDown();
        thread1.join();
        thread2.join();
        assertEquals(1, runCalled.get());
      }
    
      public void testAddAfterRun() throws Exception {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 4.7K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/util/concurrent/CycleDetectingLockFactory.java

     * example involving two locks and two threads, deadlock occurs when one thread acquires Lock A, and
     * then Lock B, while another thread acquires Lock B, and then Lock A:
     *
     * <pre>
     * Thread1: acquire(LockA) --X acquire(LockB)
     * Thread2: acquire(LockB) --X acquire(LockA)
     * </pre>
     *
     * <p>Neither thread will progress because each is waiting for the other. In more complex
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Dec 15 19:31:54 GMT 2023
    - 35.9K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/util/concurrent/CallablesTest.java

              public @Nullable Void call() throws Exception {
                assertEquals(Thread.currentThread().getName(), newName.get());
                return null;
              }
            };
        Callables.threadRenaming(callable, newName).call();
        assertEquals(oldName, Thread.currentThread().getName());
      }
    
      @J2ktIncompatible
      @GwtIncompatible // threads
      public void testRenaming_exceptionalReturn() throws Exception {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 5.4K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/TestThread.java

        start();
      }
    
      // Thread.stop() is okay because all threads started by a test are dying at the end of the test,
      // so there is no object state put at risk by stopping the threads abruptly. In some cases a test
      // may put a thread into an uninterruptible operation intentionally, so there is no other way to
      // clean up these threads.
      @SuppressWarnings("deprecation")
      @Override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 26 20:07:17 GMT 2023
    - 10.9K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java

       * state: BLOCKED, WAITING, or TIMED_WAITING.
       */
      void waitForThreadToEnterWaitState(Thread thread, long timeoutMillis) {
        long startTime = System.nanoTime();
        for (; ; ) {
          Thread.State s = thread.getState();
          if (s == Thread.State.BLOCKED || s == Thread.State.WAITING || s == Thread.State.TIMED_WAITING)
            return;
    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)
  6. android/guava-tests/test/com/google/common/util/concurrent/MonitorTestCase.java

        thread1.callAndAssertReturns(enter());
        thread2.callAndAssertBlocks(enter());
        thread1.callAndAssertReturns(leave());
        thread2.assertPriorCallReturns(enter());
      }
    
      public final void testTryEnter() throws Exception {
        thread1.callAndAssertReturns(true, tryEnter());
        thread2.callAndAssertReturns(false, tryEnter());
        thread1.callAndAssertReturns(true, tryEnter());
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 26 20:07:17 GMT 2023
    - 7.9K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/util/concurrent/ThreadFactoryBuilderTest.java

                thread.setUncaughtExceptionHandler(UNCAUGHT_EXCEPTION_HANDLER);
                return thread;
              }
            };
    
        Thread thread =
            builder.setThreadFactory(backingThreadFactory).build().newThread(monitoredRunnable);
    
        assertEquals(THREAD_NAME, thread.getName());
        assertEquals(THREAD_PRIORITY, thread.getPriority());
        assertEquals(THREAD_DAEMON, thread.isDaemon());
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/util/concurrent/Monitor.java

       *
       * <p>On the other hand, if a signalled thread wakes up to discover that its guard is still not
       * satisfied, it does *not* need to call this method before returning to wait. This can only
       * happen due to spurious wakeup (ignorable) or another thread acquiring the lock before the
       * current thread can and returning the guard to the unsatisfied state. In the latter case the
    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)
  9. maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java

        private final Executor executor;
    
        public DefaultArtifactResolver() {
            int threads = Integer.getInteger("maven.artifact.threads", 5);
            if (threads <= 1) {
                executor = Runnable::run;
            } else {
                executor = new ThreadPoolExecutor(
                        threads, threads, 3, TimeUnit.SECONDS, new LinkedBlockingQueue<>(), new DaemonThreadCreator());
            }
        }
    
    Java
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Thu Apr 25 05:46:50 GMT 2024
    - 24.8K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/util/concurrent/TrustedListenableFutureTaskTest.java

                });
        assertFalse(task.isDone());
        Thread thread =
            new Thread(
                new Runnable() {
                  @Override
                  public void run() {
                    try {
                      task.run();
                    } finally {
                      exitLatch.countDown();
                    }
                  }
                });
        thread.start();
        enterLatch.await();
    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)
Back to top