Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 294 for acquire (0.24 sec)

  1. 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 Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 21.6K bytes
    - Viewed (0)
  2. 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)
  3. android/guava/src/com/google/common/util/concurrent/RateLimiter.java

       */
      @CanIgnoreReturnValue
      public double acquire() {
        return acquire(1);
      }
    
      /**
       * Acquires the given number of permits from this {@code RateLimiter}, blocking until the request
       * can be granted. Tells the amount of time slept, if any.
       *
       * @param permits the number of permits to acquire
       * @return time spent sleeping to enforce rate, in seconds; 0.0 if not rate-limited
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 04 09:45:04 GMT 2023
    - 18.2K bytes
    - Viewed (0)
  4. internal/dsync/drwmutex.go

    	quorumLocked := checkQuorumLocked(locks, quorum) && locksFailed <= tolerance
    	if !quorumLocked {
    		log("dsync: Unable to acquire lock in quorum %#v\n", args)
    		// Release all acquired locks without quorum.
    		if !releaseAll(ctx, ds, tolerance, owner, locks, isReadLock, restClnts, names...) {
    			log("Unable to release acquired locks, these locks will expire automatically %#v\n", args)
    		}
    	}
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 19.7K bytes
    - Viewed (0)
  5. 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)
  6. src/main/java/jcifs/smb/SmbTreeImpl.java

         */
        public SmbTreeImpl acquire ( boolean track ) {
            long usage = this.usageCount.incrementAndGet();
            if ( log.isTraceEnabled() ) {
                log.trace("Acquire tree " + usage + " " + this);
            }
    
            if ( track && this.traceResource ) {
                synchronized ( this.acquires ) {
                    this.acquires.add(truncateTrace(Thread.currentThread().getStackTrace()));
    Java
    - Registered: Sun Apr 28 00:10:09 GMT 2024
    - Last Modified: Thu Jan 05 13:06:39 GMT 2023
    - 29.6K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/util/concurrent/SmoothRateLimiter.java

       * evaluate the integral of the function from 7.0 to 10.0.
       *
       * Using integrals guarantees that the effect of a single acquire(3) is equivalent to {
       * acquire(1); acquire(1); acquire(1); }, or { acquire(2); acquire(1); }, etc, since the integral
       * of the function in [7.0, 10.0] is equivalent to the sum of the integrals of [7.0, 8.0], [8.0,
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 04 09:45:04 GMT 2023
    - 19.3K bytes
    - Viewed (0)
  8. src/main/java/jcifs/smb/SmbPipeHandleImpl.java

                    }
                    // one extra acquire to keep this open till the stream is released
                    return this.handle.acquire();
                }
    
            }
            log.trace("Pipe already open");
            return this.handle.acquire();
        }
    
    
        /**
         * {@inheritDoc}
         *
         * @see jcifs.SmbPipeHandle#getInput()
    Java
    - Registered: Sun Apr 28 00:10:09 GMT 2024
    - Last Modified: Mon Apr 13 17:05:22 GMT 2020
    - 10.3K bytes
    - Viewed (0)
  9. src/main/java/jcifs/smb/SmbTreeConnection.java

                                    log.debug("Acquire tree on first usage " + t);
                                }
                                t.acquire();
                                this.treeAcquired = true;
                            }
                        }
                    }
                    if ( this.delegate != null && !this.delegateAcquired ) {
                        log.debug("Acquire delegate on first usage");
    Java
    - Registered: Sun Apr 28 00:10:09 GMT 2024
    - Last Modified: Tue Jul 07 10:50:16 GMT 2020
    - 31K bytes
    - Viewed (0)
  10. src/main/java/jcifs/smb/SmbFileInputStream.java

                }
                else {
                    this.handle = this.file.openUnshared(this.openFlags, this.access, this.sharing, SmbConstants.ATTR_NORMAL, 0).acquire();
                }
                return this.handle;
            }
            return this.handle.acquire();
        }
    
    
        protected static IOException seToIoe ( SmbException se ) {
            IOException ioe = se;
            Throwable root = se.getCause();
    Java
    - Registered: Sun Apr 28 00:10:09 GMT 2024
    - Last Modified: Sun May 17 08:55:14 GMT 2020
    - 13.2K bytes
    - Viewed (0)
Back to top