- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 16 for tryLock (0.15 sec)
-
platforms/core-runtime/base-services/src/test/groovy/org/gradle/internal/resources/DefaultResourceLockCoordinationServiceTest.groovy
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Thu Apr 11 17:16:10 UTC 2024 - 15.4K bytes - Viewed (0) -
platforms/core-runtime/base-services/src/main/java/org/gradle/internal/resources/DefaultResourceLockCoordinationService.java
return new AcquireLocks(resourceLocks, false); } /** * Attempts an atomic, non-blocking lock on the provided resource locks. */ public static InternalTransformer<ResourceLockState.Disposition, ResourceLockState> tryLock(ResourceLock... resourceLocks) {
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Thu Apr 11 17:16:10 UTC 2024 - 11.9K bytes - Viewed (0) -
platforms/core-runtime/base-services/src/test/groovy/org/gradle/internal/work/DefaultWorkerLeaseServiceProjectLockTest.groovy
import java.util.concurrent.locks.ReentrantLock import static org.gradle.internal.resources.DefaultResourceLockCoordinationService.lock import static org.gradle.internal.resources.DefaultResourceLockCoordinationService.tryLock import static org.gradle.internal.resources.DefaultResourceLockCoordinationService.unlock import static org.gradle.util.Path.path class DefaultWorkerLeaseServiceProjectLockTest extends AbstractWorkerLeaseServiceTest {
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Apr 05 16:29:26 UTC 2024 - 25.6K bytes - Viewed (0) -
src/runtime/mgclimit.go
l.bucket.fill -= uint64(-change) } if change != 0 && enabled { l.enabled.Store(false) } } // tryLock attempts to lock l. Returns true on success. func (l *gcCPULimiterState) tryLock() bool { return l.lock.CompareAndSwap(0, 1) } // unlock releases the lock on l. Must be called if tryLock returns true. func (l *gcCPULimiterState) unlock() { old := l.lock.Swap(0) if old != 1 { throw("double unlock")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 22 22:07:41 UTC 2024 - 17.3K bytes - Viewed (0) -
platforms/core-runtime/messaging/src/main/java/org/gradle/internal/event/DefaultListenerManager.java
ensureAllWithoutLoggerInitialized(); } void maybeAdd(final ListenerDetails listener) { if (type.isInstance(listener.listener)) { if (broadcasterLock.tryLock()) { try { checkListenersCanBeAdded(); listeners.add(listener); invalidateDispatchCache(); } finally {
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Thu Apr 11 10:09:43 UTC 2024 - 18.3K bytes - Viewed (0) -
platforms/software/dependency-management/src/integTest/groovy/org/gradle/integtests/resolve/ParallelDownloadsIntegrationTest.groovy
compile 'test:test3:1.0' compile 'test:test4:1.0' components { all { ComponentMetadataDetails details -> if (!lock.tryLock()) { throw new AssertionError("Rule called concurrently") } lock.unlock() }
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Apr 05 17:10:15 UTC 2024 - 13K bytes - Viewed (0) -
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) -
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)