- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 66 for tryLock (0.14 sec)
-
platforms/core-execution/persistent-cache/src/main/java/org/gradle/cache/internal/filelock/LockStateAccess.java
} catch (EOFException e) { return protocol.createInitialState(); } } public FileLockOutcome tryLock(RandomAccessFile lockFileAccess, boolean shared) throws IOException { try { FileLock fileLock = lockFileAccess.getChannel().tryLock(REGION_START, stateRegionSize, shared); if (fileLock == null) { return FileLockOutcome.LOCKED_BY_ANOTHER_PROCESS;
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Sep 22 09:08:47 UTC 2023 - 4K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/Uninterruptibles.java
} } } finally { if (interrupted) { Thread.currentThread().interrupt(); } } } /** * Invokes {@code lock.}{@link Lock#tryLock(long, TimeUnit) tryLock(timeout, unit)} * uninterruptibly. * * @since 30.0 */ @J2ktIncompatible @GwtIncompatible // concurrency public static boolean tryLockUninterruptibly(Lock lock, Duration timeout) {
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Tue Apr 04 09:45:04 UTC 2023 - 18.7K bytes - Viewed (0) -
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/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/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)