Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for Unlock (0.2 sec)

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

     *
     * <ul>
     *   <li>for an unnested {@code lock()} and {@code unlock()}, a cycle detecting lock takes 38ns as
     *       opposed to the 24ns taken by a plain lock.
     *   <li>for nested locking, the cost increases with the depth of the nesting:
     *       <ul>
     *         <li>2 levels: average of 64ns per lock()/unlock()
     *         <li>3 levels: average of 77ns per lock()/unlock()
     *         <li>4 levels: average of 99ns per lock()/unlock()
    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)
  2. android/guava/src/com/google/common/util/concurrent/Monitor.java

        }
        final ReentrantLock lock = this.lock;
        lock.lock();
    
        boolean satisfied = false;
        try {
          return satisfied = guard.isSatisfied();
        } finally {
          if (!satisfied) {
            lock.unlock();
          }
        }
      }
    
      /**
       * Enters this monitor if the guard is satisfied. Blocks at most the given time acquiring the
       * lock, but does not wait for the guard to be 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)
  3. android/guava/src/com/google/common/collect/MapMakerInternalMap.java

        }
    
        // reference queues, for garbage collection cleanup
    
        /** Cleanup collected entries when the lock is available. */
        void tryDrainReferenceQueues() {
          if (tryLock()) {
            try {
              maybeDrainReferenceQueues();
            } finally {
              unlock();
            }
          }
        }
    
        @GuardedBy("this")
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 91.9K bytes
    - Viewed (0)
  4. guava/src/com/google/common/cache/LocalCache.java

          } finally {
            unlock();
            postWriteCleanup();
          }
        }
    
        // reference queues, for garbage collection cleanup
    
        /** Cleanup collected entries when the lock is available. */
        void tryDrainReferenceQueues() {
          if (tryLock()) {
            try {
              drainReferenceQueues();
            } finally {
              unlock();
            }
          }
        }
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 150.3K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/util/concurrent/AbstractScheduledService.java

             * holding a lock. Still, it would be nice to avoid somehow.
             */
            lock.lock();
            try {
              currentFuture.cancel(mayInterruptIfRunning);
            } finally {
              lock.unlock();
            }
          }
    
          @Override
          public boolean isCancelled() {
            lock.lock();
            try {
              return currentFuture.isCancelled();
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Dec 13 19:45:20 GMT 2023
    - 25.8K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/cache/CacheTesting.java

            drainRecencyQueue(segment);
          }
        }
      }
    
      static void drainRecencyQueue(Segment<?, ?> segment) {
        segment.lock();
        try {
          segment.cleanUp();
        } finally {
          segment.unlock();
        }
      }
    
      static void drainReferenceQueues(Cache<?, ?> cache) {
        if (hasLocalCache(cache)) {
          drainReferenceQueues(toLocalCache(cache));
        }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 16.7K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/cache/CacheTesting.java

            drainRecencyQueue(segment);
          }
        }
      }
    
      static void drainRecencyQueue(Segment<?, ?> segment) {
        segment.lock();
        try {
          segment.cleanUp();
        } finally {
          segment.unlock();
        }
      }
    
      static void drainReferenceQueues(Cache<?, ?> cache) {
        if (hasLocalCache(cache)) {
          drainReferenceQueues(toLocalCache(cache));
        }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 16.7K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/cache/LocalCache.java

          } finally {
            unlock();
            postWriteCleanup();
          }
        }
    
        // reference queues, for garbage collection cleanup
    
        /** Cleanup collected entries when the lock is available. */
        void tryDrainReferenceQueues() {
          if (tryLock()) {
            try {
              drainReferenceQueues();
            } finally {
              unlock();
            }
          }
        }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 144.7K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/base/Charsets.java

     * @since 1.0
     */
    @GwtCompatible(emulated = true)
    @ElementTypesAreNonnullByDefault
    public final class Charsets {
      private Charsets() {}
    
      /**
       * US-ASCII: seven-bit ASCII, the Basic Latin block of the Unicode character set (ISO646-US).
       *
       * <p><b>Java 7+ users:</b> this constant should be treated as deprecated; use {@link
       * java.nio.charset.StandardCharsets#US_ASCII} instead.
       *
       */
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/util/concurrent/TimeoutFuture.java

              ScheduledFuture<?> timer = timeoutFuture.timer;
              timeoutFuture.timer = null; // Don't include already elapsed delay in delegate.toString()
              String message = "Timed out";
              // This try-finally block ensures that we complete the timeout future, even if attempting
              // to produce the message throws (probably StackOverflowError from delegate.toString())
              try {
                if (timer != null) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 01 21:46:34 GMT 2024
    - 7.7K bytes
    - Viewed (0)
Back to top