Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 329 for lock1 (0.04 sec)

  1. platforms/core-runtime/base-services/src/test/groovy/org/gradle/internal/resources/DefaultResourceLockCoordinationServiceTest.groovy

            then:
            !lock1.lockedState
            !lock2.lockedState
        }
    
        def "can lock resources atomically with tryLock"() {
            def lock1 = resourceLock("lock1", lock1Locked)
            def lock2 = resourceLock("lock1", lock2Locked)
    
            when:
            def disposition = null
            coordinationService.withStateLock(new InternalTransformer<ResourceLockState.Disposition, ResourceLockState>() {
                @Override
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 11 17:16:10 UTC 2024
    - 15.4K bytes
    - Viewed (0)
  2. platforms/core-runtime/base-services/src/test/groovy/org/gradle/internal/work/DefaultWorkerLeaseServiceTest.groovy

            when:
            workerLeaseService.withLocks([lock1, lock2]) {
                assert lock1.lockedState
                assert lock2.lockedState
                workerLeaseService.withoutLocks([lock1, lock2], runnable {
                    assert !lock1.lockedState
                    assert !lock2.lockedState
                    assert !lock1.doIsLockedByCurrentThread()
                    assert !lock2.doIsLockedByCurrentThread()
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Apr 05 16:29:26 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  3. platforms/core-execution/persistent-cache/src/test/groovy/org/gradle/cache/internal/DefaultFileLockManagerContentionTest.groovy

        }
    
        def "lock manager is notified while holding an exclusive lock when another lock manager in same process requires lock with mode #lockMode"() {
            given:
            def file = tmpDir.file("lock-file.bin")
            def action = Mock(Consumer)
    
            def lock = createLock(Exclusive, file, manager, action)
    
            when:
            def lock2 = createLock(lockMode, file, manager2)
    
            then:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 16 15:49:51 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  4. src/runtime/metrics_test.go

    // to abstract over the relationship of two Lock calls or an RLock
    // and a Lock call.
    type locker2 interface {
    	Lock1()
    	Unlock1()
    	Lock2()
    	Unlock2()
    }
    
    type mutex struct {
    	mu sync.Mutex
    }
    
    func (m *mutex) Lock1()   { m.mu.Lock() }
    func (m *mutex) Unlock1() { m.mu.Unlock() }
    func (m *mutex) Lock2()   { m.mu.Lock() }
    func (m *mutex) Unlock2() { m.mu.Unlock() }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:52:17 UTC 2024
    - 45K bytes
    - Viewed (0)
  5. 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 {
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Sat Apr 20 17:03:43 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  6. internal/bucket/object/lock/lock.go

    	AmzObjectLockRetainUntilDate     = "X-Amz-Object-Lock-Retain-Until-Date"
    	AmzObjectLockMode                = "X-Amz-Object-Lock-Mode"
    	AmzObjectLockLegalHold           = "X-Amz-Object-Lock-Legal-Hold"
    )
    
    var (
    	// ErrMalformedBucketObjectConfig -indicates that the bucket object lock config is malformed
    	ErrMalformedBucketObjectConfig = errors.New("invalid bucket object lock config")
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  7. src/runtime/lockrank_on.go

    		// No possibility of lock ordering problem if no other locks held
    		return
    	}
    
    	systemstack(func() {
    		i := gp.m.locksHeldLen
    		if i >= len(gp.m.locksHeld) {
    			throw("too many locks held concurrently for rank checking")
    		}
    		// Temporarily add this lock to the locksHeld list, so
    		// checkRanks() will print out list, including this lock, if there
    		// is a lock ordering problem.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 22 14:29:04 UTC 2024
    - 10.6K bytes
    - Viewed (0)
  8. samples/bookinfo/src/details/Gemfile.lock

    Brian Sonnenberg <******@****.***> 1716576125 -0700
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 24 18:42:05 UTC 2024
    - 171 bytes
    - Viewed (0)
  9. internal/dsync/drwmutex.go

    		case <-ctx.Done():
    			return false
    		default:
    			// Try to acquire the lock.
    			if locked = lock(ctx, dm.clnt, &locks, id, source, isReadLock, tolerance, quorum, dm.Names...); locked {
    				dm.m.Lock()
    
    				// If success, copy array to object
    				if isReadLock {
    					copy(dm.readLocks, locks)
    				} else {
    					copy(dm.writeLocks, locks)
    				}
    
    				dm.m.Unlock()
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 19.7K bytes
    - Viewed (0)
  10. platforms/core-execution/persistent-cache/src/main/java/org/gradle/cache/internal/ProducerGuard.java

            private final Striped<Lock> locks = Striped.lock(Runtime.getRuntime().availableProcessors() * 4);
    
            @Override
            public <V> V guardByKey(T key, Supplier<V> supplier) {
                Lock lock = locks.get(key);
                lock.lock();
                try {
                    return supplier.get();
                } finally {
                    lock.unlock();
                }
            }
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Apr 26 16:02:31 UTC 2024
    - 4.7K bytes
    - Viewed (0)
Back to top