Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for tryLock (0.13 sec)

  1. subprojects/core/src/test/groovy/org/gradle/execution/plan/DefaultPlanExecutorTest.groovy

            then:
            result.failures.empty
    
            1 * workerLeaseService.currentWorkerLease >> workerLease
    
            then:
            1 * cancellationHandler.isCancellationRequested() >> false
            1 * workerLease.tryLock() >> true
            1 * workSource.executionState() >> WorkSource.State.MaybeWorkReadyToStart
            1 * workSource.selectNext() >> WorkSource.Selection.of(node)
            1 * worker.execute(node)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Apr 05 16:29:26 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  2. src/sync/rwmutex.go

    	}
    }
    
    // TryLock tries to lock rw for writing and reports whether it succeeded.
    //
    // Note that while correct uses of TryLock do exist, they are rare,
    // and use of TryLock is often a sign of a deeper problem
    // in a particular use of mutexes.
    func (rw *RWMutex) TryLock() bool {
    	if race.Enabled {
    		_ = rw.w.state
    		race.Disable()
    	}
    	if !rw.w.TryLock() {
    		if race.Enabled {
    			race.Enable()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 21:14:51 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  3. src/sync/mutex.go

    	}
    	// Slow path (outlined so that the fast path can be inlined)
    	m.lockSlow()
    }
    
    // TryLock tries to lock m and reports whether it succeeded.
    //
    // Note that while correct uses of TryLock do exist, they are rare,
    // and use of TryLock is often a sign of a deeper problem
    // in a particular use of mutexes.
    func (m *Mutex) TryLock() bool {
    	old := m.state
    	if old&(mutexLocked|mutexStarving) != 0 {
    		return false
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 21:14:51 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  4. platforms/core-execution/persistent-cache/src/main/java/org/gradle/cache/internal/filelock/LockInfoAccess.java

            lockFileAccess.setLength(Math.min(lockFileAccess.length(), infoRegionPos));
        }
    
        public FileLockOutcome tryLock(RandomAccessFile lockFileAccess, boolean shared) throws IOException {
            try {
                FileLock fileLock = lockFileAccess.getChannel().tryLock(infoRegionPos, INFORMATION_REGION_SIZE - infoRegionPos, shared);
                if (fileLock == null) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 16 15:49:51 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  5. platforms/core-runtime/files/src/main/java/org/gradle/internal/file/locking/ExclusiveFileAccessManager.java

                while (lock == null && getTimeMillis() < expiry) {
                    randomAccessFile = new RandomAccessFile(lockFile, "rw");
                    channel = randomAccessFile.getChannel();
                    lock = channel.tryLock();
    
                    if (lock == null) {
                        maybeCloseQuietly(channel);
                        maybeCloseQuietly(randomAccessFile);
                        Thread.sleep(pollIntervalMs);
                    }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Jan 10 15:52:53 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  6. testing/internal-testing/src/main/groovy/org/gradle/test/fixtures/work/TestWorkerLeaseService.groovy

                    return false
                }
    
                @Override
                boolean isLockedByCurrentThread() {
                    return false
                }
    
                @Override
                boolean tryLock() {
                    return false
                }
    
                @Override
                void unlock() {
    
                }
    
                @Override
                String getDisplayName() {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 07:21:38 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  7. internal/cachevalue/cache.go

    		return *v, nil
    	}
    
    	// Fetch new value asynchronously, while we do not return an error
    	// if v != nil value or
    	if t.opts.NoWait && v != nil && tNow-vTime < ttl.Milliseconds()*2 {
    		if t.updating.TryLock() {
    			go func() {
    				defer t.updating.Unlock()
    				t.update(context.Background())
    			}()
    		}
    		return *v, nil
    	}
    
    	// Get lock. Either we get it or we wait for it.
    	t.updating.Lock()
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 12:50:46 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  8. src/internal/runtime/atomic/atomic_mipsx.s

    TEXT ·Oruintptr(SB), NOSPLIT, $0-12
    	JMP	·Or32(SB)
    
    TEXT ·spinLock(SB),NOSPLIT,$0-4
    	MOVW	state+0(FP), R1
    	MOVW	$1, R2
    	SYNC
    try_lock:
    	MOVW	R2, R3
    check_again:
    	LL	(R1), R4
    	BNE	R4, check_again
    	SC	R3, (R1)
    	BEQ	R3, try_lock
    	SYNC
    	RET
    
    TEXT ·spinUnlock(SB),NOSPLIT,$0-4
    	MOVW	state+0(FP), R1
    	SYNC
    	MOVW	R0, (R1)
    	SYNC
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat May 11 21:29:34 UTC 2024
    - 4.9K bytes
    - Viewed (0)
Back to top