Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. 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)
  2. 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)
  3. pkg/util/iptables/iptables_linux.go

    	"k8s.io/apimachinery/pkg/util/wait"
    )
    
    type locker struct {
    	lock16 *os.File
    	lock14 *net.UnixListener
    }
    
    func (l *locker) Close() error {
    	errList := []error{}
    	if l.lock16 != nil {
    		if err := l.lock16.Close(); err != nil {
    			errList = append(errList, err)
    		}
    	}
    	if l.lock14 != nil {
    		if err := l.lock14.Close(); err != nil {
    			errList = append(errList, err)
    		}
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 24 19:47:49 UTC 2021
    - 2.6K bytes
    - Viewed (0)
  4. internal/lock/lock.go

    // has reached zero, i.e when all the readers have given up their locks.
    type RLockedFile struct {
    	*LockedFile
    	mutex sync.Mutex
    	refs  int // Holds read lock refs.
    }
    
    // IsClosed - Check if the rlocked file is already closed.
    func (r *RLockedFile) IsClosed() bool {
    	r.mutex.Lock()
    	defer r.mutex.Unlock()
    	return r.refs == 0
    }
    
    // IncLockRef - is used by called to indicate lock refs.
    func (r *RLockedFile) IncLockRef() {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Sun Jan 02 17:15:06 UTC 2022
    - 2.5K 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. platforms/core-runtime/base-services/src/test/groovy/org/gradle/internal/resources/SharedResourceLeaseRegistryTest.groovy

            and:
            def lockA = sharedResourceLeaseRegistry.getResourceLock('resource-a')
            def lockB = sharedResourceLeaseRegistry.getResourceLock('resource-b')
    
            when:
            coordinationService.withStateLock(lock(lockA))
            coordinationService.withStateLock(lock(lockB))
    
            then:
            lockIsHeld(lockA)
            lockIsHeld(lockB)
    
            when:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:48:02 UTC 2023
    - 5K bytes
    - Viewed (0)
  7. cmd/lock-rest-server.go

    		dst.Code = dsync.RespErr
    		dst.Err = err.Error()
    	}
    	return dst, nil
    }
    
    const (
    	// Lock maintenance interval.
    	lockMaintenanceInterval = 1 * time.Minute
    
    	// Lock validity duration
    	lockValidityDuration = 1 * time.Minute
    )
    
    // lockMaintenance loops over all locks and discards locks
    // that have not been refreshed for some time.
    func lockMaintenance(ctx context.Context) {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Nov 21 01:09:35 UTC 2023
    - 5.9K bytes
    - Viewed (0)
  8. cmd/shared-lock.go

    		for {
    			select {
    			case <-ctx.Done():
    				return
    			case <-lkctx.Context().Done():
    				// The context of the lock is canceled, this can happen
    				// if one lock lost quorum due to cluster instability
    				// in that case, try to lock again.
    				break keepLock
    			case ld.lockContext <- lkctx:
    				// Send the lock context to anyone asking for it
    			}
    		}
    	}
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Feb 13 09:26:38 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  9. releasenotes/notes/iptables-lock.yaml

    apiVersion: release-notes/v2
    kind: bug-fix
    area: traffic-management
    releaseNotes:
      - |
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Sep 28 15:20:31 UTC 2023
    - 245 bytes
    - Viewed (0)
  10. src/runtime/lock_wasip1.go

    )
    
    func mutexContended(l *mutex) bool {
    	return false
    }
    
    func lock(l *mutex) {
    	lockWithRank(l, getLockRank(l))
    }
    
    func lock2(l *mutex) {
    	if l.key == mutex_locked {
    		// wasm is single-threaded so we should never
    		// observe this.
    		throw("self deadlock")
    	}
    	gp := getg()
    	if gp.m.locks < 0 {
    		throw("lock count")
    	}
    	gp.m.locks++
    	l.key = mutex_locked
    }
    
    func unlock(l *mutex) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 21 21:02:20 UTC 2023
    - 2K bytes
    - Viewed (0)
Back to top