Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 825 for Threads (0.2 sec)

  1. android/guava/src/com/google/common/util/concurrent/ThreadFactoryBuilder.java

        // Thread#setPriority() already checks for validity. These error messages
        // are nicer though and will fail-fast.
        checkArgument(
            priority >= Thread.MIN_PRIORITY,
            "Thread priority (%s) must be >= %s",
            priority,
            Thread.MIN_PRIORITY);
        checkArgument(
            priority <= Thread.MAX_PRIORITY,
            "Thread priority (%s) must be <= %s",
            priority,
            Thread.MAX_PRIORITY);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 10 21:56:03 GMT 2023
    - 7.6K bytes
    - Viewed (0)
  2. docs/contribute/concurrency.md

    Framing rules make it impractical to implement http/2 correctly on a single blocking thread. The flow-control features introduce feedback between reads and writes, requiring writes to acknowledge reads and reads to throttle writes.
    
    In OkHttp we expose a blocking API over a framed protocol. This document explains the code and policy that makes that work.
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 16:35:36 GMT 2022
    - 7K bytes
    - Viewed (0)
  3. guava-tests/benchmark/com/google/common/util/concurrent/MoreExecutorsDirectExecutorBenchmark.java

                  }
                  countingRunnable.integer.addAndGet(localRunnable.integer.get());
                }
              };
          threads.add(thread);
        }
      }
    
      @AfterExperiment
      void after() {
        for (Thread thread : threads) {
          thread.interrupt(); // try to get them to exit
        }
        threads.clear();
      }
    
      @Footprint
      Object measureSize() {
        return executor;
      }
    
      @Benchmark
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.4K bytes
    - Viewed (0)
  4. android/guava-tests/benchmark/com/google/common/util/concurrent/MoreExecutorsDirectExecutorBenchmark.java

                  }
                  countingRunnable.integer.addAndGet(localRunnable.integer.get());
                }
              };
          threads.add(thread);
        }
      }
    
      @AfterExperiment
      void after() {
        for (Thread thread : threads) {
          thread.interrupt(); // try to get them to exit
        }
        threads.clear();
      }
    
      @Footprint
      Object measureSize() {
        return executor;
      }
    
      @Benchmark
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.4K bytes
    - Viewed (0)
  5. src/main/java/jcifs/smb1/smb1/TestLocking.java

                } else {
                    t.url = args[ai];
                }
            }
    
            Thread[] threads = new Thread[t.numThreads];
            int ti;
    
            for (ti = 0; ti < t.numThreads; ti++) {
                threads[ti] = new Thread(t);
                System.out.print(threads[ti].getName());
                threads[ti].start();
            }
    
            while (t.numComplete < t.numThreads) {
                long delay;
    
    Java
    - Registered: Sun May 05 00:10:10 GMT 2024
    - Last Modified: Fri Mar 22 21:10:40 GMT 2019
    - 3.4K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskRunner.kt

      /**
       * When we need a new thread to run tasks, we call [Backend.execute]. A few microseconds later we
       * expect a newly-started thread to call [Runnable.run]. We shouldn't request new threads until
       * the already-requested ones are in service, otherwise we might create more threads than we need.
       *
       * We use [executeCallCount] and [runCallCount] to defend against starting more threads than we
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 29 00:33:04 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/base/SuppliersTest.java

        for (int i = 0; i < numThreads; i++) {
          threads[i] =
              new Thread() {
                @Override
                public void run() {
                  assertSame(Boolean.TRUE, memoizedSupplier.get());
                }
              };
        }
        for (Thread t : threads) {
          t.start();
        }
        for (Thread t : threads) {
          t.join();
        }
    
        if (thrown.get() != null) {
    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)
  8. android/guava-tests/test/com/google/common/base/SuppliersTest.java

        for (int i = 0; i < numThreads; i++) {
          threads[i] =
              new Thread() {
                @Override
                public void run() {
                  assertSame(Boolean.TRUE, memoizedSupplier.get());
                }
              };
        }
        for (Thread t : threads) {
          t.start();
        }
        for (Thread t : threads) {
          t.join();
        }
    
        if (thrown.get() != null) {
    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)
  9. android/guava/src/com/google/common/cache/Striped64.java

       * there would exist a perfect hash function mapping threads to
       * slots that eliminates collisions. When we reach capacity, we
       * search for this mapping by randomly varying the hash codes of
       * colliding threads.  Because search is random, and collisions
       * only become known via CAS failures, convergence can be slow,
       * and because threads are typically not bound to CPUS forever,
       * may not occur at all. However, despite these limitations,
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 11.5K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/util/concurrent/MoreExecutors.java

      }
    
      /**
       * Add a shutdown hook to wait for thread completion in the given {@link ExecutorService service}.
       * This is useful if the given service uses daemon threads, and we want to keep the JVM from
       * exiting immediately on shutdown, instead giving these daemon threads a chance to terminate
       * normally.
       *
       * @param service ExecutorService which uses daemon threads
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 17 16:33:44 GMT 2024
    - 41.8K bytes
    - Viewed (0)
Back to top