Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 12 for semaphore (0.75 seconds)

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

        assertInterrupted();
      }
    
      // Semaphore.tryAcquire() tests
      public void testTryAcquireWithNoWait() {
        Stopwatch stopwatch = Stopwatch.createStarted();
        Semaphore semaphore = new Semaphore(99);
        assertTrue(tryAcquireUninterruptibly(semaphore, 0, MILLISECONDS));
        assertTrue(tryAcquireUninterruptibly(semaphore, -42, MILLISECONDS));
        assertTrue(tryAcquireUninterruptibly(semaphore, LONG_DELAY_MS, MILLISECONDS));
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 38.1K bytes
    - Click Count (0)
  2. guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

        assertInterrupted();
      }
    
      // Semaphore.tryAcquire() tests
      public void testTryAcquireWithNoWait() {
        Stopwatch stopwatch = Stopwatch.createStarted();
        Semaphore semaphore = new Semaphore(99);
        assertTrue(tryAcquireUninterruptibly(semaphore, 0, MILLISECONDS));
        assertTrue(tryAcquireUninterruptibly(semaphore, -42, MILLISECONDS));
        assertTrue(tryAcquireUninterruptibly(semaphore, LONG_DELAY_MS, MILLISECONDS));
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 38.1K bytes
    - Click Count (0)
  3. android/guava/src/com/google/common/util/concurrent/Uninterruptibles.java

      @IgnoreJRERequirement // Users will use this only if they're already using Duration.
      public static boolean tryAcquireUninterruptibly(Semaphore semaphore, Duration timeout) {
        return tryAcquireUninterruptibly(semaphore, toNanosSaturated(timeout), NANOSECONDS);
      }
    
      /**
       * Invokes {@code semaphore.}{@link Semaphore#tryAcquire(int, long, TimeUnit) tryAcquire(1,
       * timeout, unit)} uninterruptibly.
       *
       * @since 18.0
       */
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Jan 29 23:24:32 GMT 2026
    - 22.5K bytes
    - Click Count (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/StripedTest.java

            Striped.custom(100, FAIR_LOCK_SUPPLER),
            Striped.custom(256, FAIR_LOCK_SUPPLER),
            Striped.semaphore(100, 1),
            Striped.semaphore(256, 1));
      }
    
      private static final Supplier<Lock> FAIR_LOCK_SUPPLER = () -> new ReentrantLock(true);
    
      private static final Supplier<Semaphore> SEMAPHORE_SUPPLER = () -> new Semaphore(1, false);
    
      private static List<Striped<?>> weakImplementations() {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 8.1K bytes
    - Click Count (0)
  5. guava-tests/test/com/google/common/util/concurrent/StripedTest.java

            Striped.custom(100, FAIR_LOCK_SUPPLER),
            Striped.custom(256, FAIR_LOCK_SUPPLER),
            Striped.semaphore(100, 1),
            Striped.semaphore(256, 1));
      }
    
      private static final Supplier<Lock> FAIR_LOCK_SUPPLER = () -> new ReentrantLock(true);
    
      private static final Supplier<Semaphore> SEMAPHORE_SUPPLER = () -> new Semaphore(1, false);
    
      private static List<Striped<?>> weakImplementations() {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 8.1K bytes
    - Click Count (0)
  6. android/guava/src/com/google/common/util/concurrent/Striped.java

      }
    
      /**
       * Creates a {@code Striped<Semaphore>} with eagerly initialized, strongly referenced semaphores,
       * with the specified number of permits.
       *
       * @param stripes the minimum number of stripes (semaphores) required
       * @param permits the number of permits in each semaphore
       * @return a new {@code Striped<Semaphore>}
       */
      public static Striped<Semaphore> semaphore(int stripes, int permits) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Sep 16 22:01:32 GMT 2025
    - 20.6K bytes
    - Click Count (0)
  7. src/main/java/org/codelibs/fess/llm/AbstractLlmClient.java

        /** The scheduled task for periodic availability checks. */
        protected TimeoutTask availabilityCheckTask;
    
        /** Semaphore for limiting concurrent LLM requests. Initialized lazily in init(). */
        protected volatile Semaphore concurrencyLimiter;
    
        /** The system prompt for LLM interactions. */
        protected String systemPrompt;
        /** The prompt for detecting user intent. */
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Sat Mar 21 06:04:58 GMT 2026
    - 72K bytes
    - Click Count (0)
  8. doc/go_mem.html

    <p>
    This rule generalizes the previous rule to buffered channels.
    It allows a counting semaphore to be modeled by a buffered channel:
    the number of items in the channel corresponds to the number of active uses,
    the capacity of the channel corresponds to the maximum number of simultaneous uses,
    sending an item acquires the semaphore, and receiving an item releases
    the semaphore.
    This is a common idiom for limiting concurrency.
    </p>
    
    <p>
    Created: Tue Apr 07 11:13:11 GMT 2026
    - Last Modified: Tue Aug 05 15:41:37 GMT 2025
    - 26.6K bytes
    - Click Count (0)
  9. src/main/java/jcifs/util/SmbCircuitBreaker.java

    import java.util.concurrent.CopyOnWriteArrayList;
    import java.util.concurrent.Executors;
    import java.util.concurrent.ScheduledExecutorService;
    import java.util.concurrent.ScheduledFuture;
    import java.util.concurrent.Semaphore;
    import java.util.concurrent.TimeUnit;
    import java.util.concurrent.atomic.AtomicInteger;
    import java.util.concurrent.atomic.AtomicLong;
    import java.util.concurrent.atomic.AtomicReference;
    import java.util.function.Supplier;
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 30 05:58:03 GMT 2025
    - 33.4K bytes
    - Click Count (0)
  10. src/main/java/jcifs/smb/SmbTransportImpl.java

        private final CIFSContext transportContext;
        private final boolean signingEnforced;
    
        private SmbNegotiationResponse negotiated;
    
        private SMBSigningDigest digest;
    
        private final Semaphore credits = new Semaphore(1, true);
    
        private final int desiredCredits = 512;
    
        private byte[] preauthIntegrityHash = new byte[64];
        private final Object preauthHashLock = new Object();
    
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 30 05:58:03 GMT 2025
    - 69.8K bytes
    - Click Count (0)
Back to Top