- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 22 for tryLock (0.26 sec)
-
platforms/core-runtime/base-services/src/test/groovy/org/gradle/internal/resources/SharedResourceLeaseRegistryTest.groovy
import java.util.concurrent.CountDownLatch import static org.gradle.internal.resources.DefaultResourceLockCoordinationService.lock import static org.gradle.internal.resources.DefaultResourceLockCoordinationService.tryLock import static org.gradle.internal.resources.DefaultResourceLockCoordinationService.unlock class SharedResourceLeaseRegistryTest extends ConcurrentSpec { def coordinationService = new DefaultResourceLockCoordinationService()
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Sep 22 08:48:02 UTC 2023 - 5K bytes - Viewed (0) -
platforms/core-runtime/base-services/src/main/java/org/gradle/internal/resources/TaskExecutionLock.java
super(displayName, coordinationService, owner); this.stateLock = stateLock; } @Override protected boolean canAcquire() { return stateLock.isLockedByCurrentThread() || stateLock.tryLock(); } @Override protected void releaseLock() { super.releaseLock(); stateLock.unlock(); }
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Sep 22 08:48:02 UTC 2023 - 1.2K bytes - Viewed (0) -
platforms/core-runtime/base-services/src/main/java/org/gradle/internal/resources/AbstractTrackedResourceLock.java
this.owner = owner; } @Override public String toString() { return getClass().getSimpleName() + " " + getDisplayName(); } @Override public boolean tryLock() { if (!isLockedByCurrentThread()) { if (acquireLock()) { LOGGER.debug("{}: acquired lock on {}", Thread.currentThread().getName(), displayName); try {
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Sep 22 08:48:02 UTC 2023 - 3.2K bytes - Viewed (0) -
platforms/ide/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/loader/SynchronizedToolingImplementationLoader.java
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Tue Sep 26 14:49:20 UTC 2023 - 2.8K bytes - Viewed (0) -
platforms/core-runtime/base-services/src/main/java/org/gradle/internal/resources/ResourceLock.java
boolean isLockedByCurrentThread(); /** * Attempt to lock this resource, if not already. Does not block. * * @return true if resource is now locked, false otherwise. */ boolean tryLock(); /** * Unlock this resource if it's held by the calling thread. */ void unlock();
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Sep 22 08:48:02 UTC 2023 - 1.6K bytes - Viewed (0) -
platforms/core-runtime/base-services/src/main/java/org/gradle/internal/work/WorkerLeaseRegistry.java
* it simply creates a {@link ResourceLock} representing the worker lease. The worker lease can be reserved only when * {@link ResourceLock#tryLock()} is called from a {@link org.gradle.internal.resources.ResourceLockCoordinationService#withStateLock(org.gradle.api.Transformer)} * transform. */ WorkerLease newWorkerLease();
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Sep 22 08:48:02 UTC 2023 - 2K bytes - Viewed (0) -
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) -
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) -
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) -
platforms/core-configuration/kotlin-dsl/src/testFixtures/kotlin/org/gradle/kotlin/dsl/fixtures/bytecode/AsmExtensions.kt
} internal inline fun <reified T> MethodVisitor.TRY_CATCH( noinline tryBlock: MethodVisitor.() -> Unit, noinline catchBlock: MethodVisitor.() -> Unit ) = TRY_CATCH(T::class.internalName, tryBlock, catchBlock) internal fun MethodVisitor.TRY_CATCH( exceptionType: InternalName, tryBlock: MethodVisitor.() -> Unit, catchBlock: MethodVisitor.() -> Unit ) {
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Wed Aug 02 08:06:49 UTC 2023 - 7.5K bytes - Viewed (0)