Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 191 for acquire (0.2 sec)

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

        limiter.acquire(Integer.MAX_VALUE / 4);
        limiter.acquire(Integer.MAX_VALUE / 2);
        limiter.acquire(Integer.MAX_VALUE);
        assertEvents("R0.00", "R0.00", "R0.00"); // no wait, infinite rate!
    
        limiter.setRate(2.0);
        limiter.acquire();
        limiter.acquire();
        limiter.acquire();
        limiter.acquire();
        limiter.acquire();
        assertEvents(
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 21.6K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/util/concurrent/CycleDetectingLockFactory.java

     *
     * <p>Deadlocks can arise when locks are acquired in an order that forms a cycle. In a simple
     * 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>
     *
    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. android/guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java

        limiter.acquire(Integer.MAX_VALUE / 4);
        limiter.acquire(Integer.MAX_VALUE / 2);
        limiter.acquire(Integer.MAX_VALUE);
        assertEvents("R0.00", "R0.00", "R0.00"); // no wait, infinite rate!
    
        limiter.setRate(2.0);
        limiter.acquire();
        limiter.acquire();
        limiter.acquire();
        limiter.acquire();
        limiter.acquire();
        assertEvents(
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 21.6K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/util/concurrent/Monitor.java

        } finally {
          if (!satisfied) {
            leave();
          }
        }
      }
    
      /**
       * Enters this monitor when the guard is satisfied. Blocks at most the given time, including both
       * the time to acquire the lock and the time to wait for the guard to be satisfied, and may be
       * interrupted.
       *
       * @return whether the monitor was entered, which guarantees that the guard is now satisfied
    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)
  5. android/guava/src/com/google/common/util/concurrent/AbstractFuture.java

       * cancelled without a call to {@code cancel}, such as by calling {@code
       * setFuture(cancelledFuture)}.
       *
       * <p>Beware of completing a future while holding a lock. Its listeners may do slow work or
       * acquire other locks, risking deadlocks.
       */
      @CanIgnoreReturnValue
      @Override
      public boolean cancel(boolean mayInterruptIfRunning) {
        Object localValue = value;
        boolean rValue = false;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 22 21:17:24 GMT 2024
    - 63K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/cache/Striped64.java

      Striped64() {}
    
      /** CASes the base field. */
      final boolean casBase(long cmp, long val) {
        return UNSAFE.compareAndSwapLong(this, baseOffset, cmp, val);
      }
    
      /** CASes the busy field from 0 to 1 to acquire lock. */
      final boolean casBusy() {
        return UNSAFE.compareAndSwapInt(this, busyOffset, 0, 1);
      }
    
      /**
       * Computes the function of current and new value. Subclasses should open-code this update
    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)
  7. guava/src/com/google/common/cache/Striped64.java

      Striped64() {}
    
      /** CASes the base field. */
      final boolean casBase(long cmp, long val) {
        return UNSAFE.compareAndSwapLong(this, baseOffset, cmp, val);
      }
    
      /** CASes the busy field from 0 to 1 to acquire lock. */
      final boolean casBusy() {
        return UNSAFE.compareAndSwapInt(this, busyOffset, 0, 1);
      }
    
      /**
       * Computes the function of current and new value. Subclasses should open-code this update
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 11.5K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/hash/Striped64.java

      Striped64() {}
    
      /** CASes the base field. */
      final boolean casBase(long cmp, long val) {
        return UNSAFE.compareAndSwapLong(this, baseOffset, cmp, val);
      }
    
      /** CASes the busy field from 0 to 1 to acquire lock. */
      final boolean casBusy() {
        return UNSAFE.compareAndSwapInt(this, busyOffset, 0, 1);
      }
    
      /**
       * Computes the function of current and new value. Subclasses should open-code this update
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 11.5K bytes
    - Viewed (0)
  9. android/guava-testlib/src/com/google/common/collect/testing/testers/CollectionRetainAllTester.java

      }
    
      // retainAll(empty)
    
      @CollectionFeature.Require(SUPPORTS_REMOVE)
      @CollectionSize.Require(ZERO)
      public void testRetainAll_emptyPreviouslyEmpty() {
        expectReturnsFalse(empty);
        expectUnchanged();
      }
    
      @CollectionFeature.Require(absent = SUPPORTS_REMOVE)
      @CollectionSize.Require(ZERO)
      public void testRetainAll_emptyPreviouslyEmptyUnsupported() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  10. android/guava-testlib/src/com/google/common/collect/testing/testers/ListAddAllAtIndexTester.java

      @ListFeature.Require(SUPPORTS_ADD_WITH_INDEX)
      @CollectionSize.Require(absent = ZERO)
      public void testAddAllAtIndex_supportedAllPresent() {
        assertTrue(
            "addAll(n, allPresent) should return true",
            getList().addAll(0, MinimalCollection.of(e0())));
        expectAdded(0, e0());
      }
    
      @ListFeature.Require(absent = SUPPORTS_ADD_WITH_INDEX)
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 6.5K bytes
    - Viewed (1)
Back to top