Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 525 for locks (0.17 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/connection/Locks.kt

    import okhttp3.internal.http2.Http2Stream
    import okhttp3.internal.http2.Http2Writer
    
    /**
     * Centralisation of central locks according to docs/contribute/concurrency.md
     */
    internal object Locks {
      inline fun <T> Dispatcher.withLock(action: () -> T): T {
        contract { callsInPlace(action, InvocationKind.EXACTLY_ONCE) }
        return lock.withLock(action)
      }
    
      inline fun <T> RealConnection.withLock(action: () -> T): T {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/util/concurrent/CycleDetectingLockFactory.java

       *
       * Lock lockA = factory1.newReentrantLock(MyLockOrder.FIRST);
       * Lock lockB = factory1.newReentrantLock(MyLockOrder.FIRST);
       * Lock lockC = factory2.newReentrantLock(MyLockOrder.FIRST);
       *
       * lockA.lock();
       *
       * lockB.lock();  // will throw an IllegalStateException
       * lockC.lock();  // will throw an IllegalStateException
       *
       * lockA.lock();  // reentrant acquisition is okay
       * }</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/CycleDetectingLockFactoryTest.java

        checkMessage(expected, "LockC -> LockA", "LockB -> LockC", "LockA -> LockB");
      }
    
      public void testReentrancy_noDeadlock() {
        lockA.lock();
        lockB.lock();
        lockA.lock(); // Should not assert on lockB -> reentrant(lockA)
      }
    
      public void testExplicitOrdering_noViolations() {
        lock1.lock();
        lock3.lock();
        lock3.unlock();
        lock2.lock();
        lock3.lock();
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 16.1K bytes
    - Viewed (1)
  4. guava-tests/test/com/google/common/util/concurrent/CycleDetectingLockFactoryTest.java

        checkMessage(expected, "LockC -> LockA", "LockB -> LockC", "LockA -> LockB");
      }
    
      public void testReentrancy_noDeadlock() {
        lockA.lock();
        lockB.lock();
        lockA.lock(); // Should not assert on lockB -> reentrant(lockA)
      }
    
      public void testExplicitOrdering_noViolations() {
        lock1.lock();
        lock3.lock();
        lock3.unlock();
        lock2.lock();
        lock3.lock();
      }
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 16.1K bytes
    - Viewed (0)
  5. tensorflow/c/experimental/filesystem/plugins/gcs/ram_file_block_cache.h

                                          int64_t file_signature)
          ABSL_LOCKS_EXCLUDED(mu_);
    
      /// Remove all cached blocks for `filename`.
      void RemoveFile(const std::string& filename) ABSL_LOCKS_EXCLUDED(mu_);
    
      /// Remove all cached data.
      void Flush() ABSL_LOCKS_EXCLUDED(mu_);
    
      /// Accessors for cache parameters.
      size_t block_size() const { return block_size_; }
    C
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Mon Aug 31 04:46:34 GMT 2020
    - 10.6K bytes
    - Viewed (0)
  6. cmd/local-locker_test.go

    	rng := rand.New(rand.NewSource(0))
    	// Numbers of unique locks
    	for _, locks := range []int{100, 1000, 1e6} {
    		if testing.Short() && locks > 100 {
    			continue
    		}
    		t.Run(fmt.Sprintf("%d-locks", locks), func(t *testing.T) {
    			// Number of readers per lock...
    			for _, readers := range []int{1, 10, 100} {
    				if locks > 1000 && readers > 1 {
    					continue
    				}
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sun Mar 05 04:57:35 GMT 2023
    - 11.8K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/util/concurrent/StripedTest.java

    import java.util.List;
    import java.util.Map;
    import java.util.Set;
    import java.util.concurrent.Semaphore;
    import java.util.concurrent.locks.Lock;
    import java.util.concurrent.locks.ReadWriteLock;
    import java.util.concurrent.locks.ReentrantLock;
    import java.util.concurrent.locks.ReentrantReadWriteLock;
    import junit.framework.TestCase;
    
    /**
     * Tests for Striped.
     *
     * @author Dimitris Andreou
     */
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 8.4K bytes
    - Viewed (0)
  8. guava-tests/benchmark/com/google/common/util/concurrent/CycleDetectingLockFactoryBenchmark.java

        lockAndUnlockNested(detectingLocks, reps);
      }
    
      private static void lockAndUnlockNested(Lock[] locks, int reps) {
        for (int i = 0; i < reps; i++) {
          for (int j = 0; j < locks.length; j++) {
            locks[j].lock();
          }
          for (int j = locks.length - 1; j >= 0; j--) {
            locks[j].unlock();
          }
        }
      }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.4K bytes
    - Viewed (0)
  9. android/guava-tests/benchmark/com/google/common/util/concurrent/CycleDetectingLockFactoryBenchmark.java

        lockAndUnlockNested(detectingLocks, reps);
      }
    
      private static void lockAndUnlockNested(Lock[] locks, int reps) {
        for (int i = 0; i < reps; i++) {
          for (int j = 0; j < locks.length; j++) {
            locks[j].lock();
          }
          for (int j = locks.length - 1; j >= 0; j--) {
            locks[j].unlock();
          }
        }
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.4K bytes
    - Viewed (0)
  10. src/main/java/jcifs/internal/smb2/lock/Smb2LockRequest.java

        private byte[] fileId;
        private final Smb2Lock[] locks;
    
    
        /**
         * @param config
         * @param fileId
         * @param locks
         */
        public Smb2LockRequest ( Configuration config, byte[] fileId, Smb2Lock[] locks ) {
            super(config, SMB2_LOCK);
            this.fileId = fileId;
            this.locks = locks;
        }
    
    
        /**
         * {@inheritDoc}
         *
    Java
    - Registered: Sun Apr 28 00:10:09 GMT 2024
    - Last Modified: Sun Jul 01 13:12:10 GMT 2018
    - 3.4K bytes
    - Viewed (0)
Back to top