- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 27 for tryLock (0.45 sec)
-
platforms/core-runtime/base-services/src/main/java/org/gradle/internal/work/DefaultWorkerLeaseService.java
import java.util.concurrent.atomic.AtomicReference; import static org.gradle.internal.resources.DefaultResourceLockCoordinationService.lock; import static org.gradle.internal.resources.DefaultResourceLockCoordinationService.tryLock; import static org.gradle.internal.resources.DefaultResourceLockCoordinationService.unlock; @ServiceScope(Scope.CrossBuildSession.class)
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Tue Apr 09 04:43:28 UTC 2024 - 20.9K bytes - Viewed (0) -
internal/ringbuffer/ring_buffer.go
// TryRead read up to len(p) bytes into p like Read but it is not blocking. // If it has not succeeded to acquire the lock, it return 0 as n and ErrAcquireLock. func (r *RingBuffer) TryRead(p []byte) (n int, err error) { ok := r.mu.TryLock() if !ok { return 0, ErrAcquireLock } defer r.mu.Unlock() if err := r.readErr(true); err != nil { return 0, err } if len(p) == 0 { return 0, r.readErr(true) }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Wed May 15 00:11:04 UTC 2024 - 13.3K bytes - Viewed (0) -
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) -
pkg/kubelet/cm/dra/claiminfo_test.go
return func() error { if cache.RWMutex.TryLock() { return errors.New("Lock succeeded") } return nil } }, }, { description: "cache is Rlocked inside a function", funcGen: func(cache *claimInfoCache) func() error { return func() error { if cache.RWMutex.TryRLock() { return errors.New("RLock succeeded") } return nil
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri May 03 13:30:31 UTC 2024 - 21K bytes - Viewed (0) -
subprojects/core/src/main/java/org/gradle/execution/plan/DefaultPlanExecutor.java
if (workSource.allExecutionComplete()) { // Need to hold a worker lease in order to finish up if (!workerLease.isLockedByCurrentThread()) { if (!workerLease.tryLock()) { return RETRY; } } workSource.collectFailures(failures); queue.removeFinishedPlans(); return FINISHED;
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Apr 05 16:29:26 UTC 2024 - 29.1K bytes - Viewed (0) -
subprojects/core/src/main/java/org/gradle/internal/model/CalculatedValueContainer.java
}); owner.calculationState = null; } finally { releaseLock(); } } private void acquireLock() { if (lock.tryLock()) { // Lock not contended - can proceed return; } // Lock is contended, so release project locks while waiting to acquire the lock
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Thu Apr 18 08:26:19 UTC 2024 - 10.3K bytes - Viewed (0) -
subprojects/composite-builds/src/test/groovy/org/gradle/composite/internal/DefaultIncludedBuildTaskGraphParallelTest.groovy
_ * project.services >> projectServices _ * project.pluginManager >> Stub(PluginManagerInternal) def lock = Stub(ResourceLock) _ * projectState.taskExecutionLock >> lock _ * lock.tryLock() >> true return task } private BuildWorkGraphController buildWorkGraphController(String displayName, BuildServices services) { def builder = Mock(BuildLifecycleController.WorkGraphBuilder)
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Apr 05 16:29:26 UTC 2024 - 20.6K bytes - Viewed (0) -
internal/grid/muxclient.go
gridLogIf(m.ctx, err) m.closeLocked() return false } } func (m *muxClient) close() { if debugPrint { fmt.Println("closing outgoing mux", m.MuxID) } if !m.respMu.TryLock() { // Cancel before locking - will unblock any pending sends. if m.cancelFn != nil { m.cancelFn(context.Canceled) } // Wait for senders to release. m.respMu.Lock() }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri Jun 07 15:51:52 UTC 2024 - 15.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java
assertTrue(signaledBeforeTimeout); assertTimeNotPassed(stopwatch, LONG_DELAY_MS); assertInterrupted(); } // Lock.tryLock() tests public void testTryLockTimeoutExceeded() { Stopwatch stopwatch = Stopwatch.createStarted(); Lock lock = new ReentrantLock(); Thread lockThread = acquireFor(lock, 5, SECONDS);
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Jun 10 16:06:39 UTC 2024 - 31.7K bytes - Viewed (0) -
android/guava/src/com/google/common/cache/LocalCache.java
} } // reference queues, for garbage collection cleanup /** Cleanup collected entries when the lock is available. */ void tryDrainReferenceQueues() { if (tryLock()) { try { drainReferenceQueues(); } finally { unlock(); } } } /**
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Sat May 18 03:24:34 UTC 2024 - 143.6K bytes - Viewed (0)