- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 67 for tryLock (0.15 sec)
-
guava/src/com/google/common/util/concurrent/Monitor.java
final ReentrantLock lock = this.lock; if (!fair && lock.tryLock()) { return true; } boolean interrupted = Thread.interrupted(); try { final long startTime = System.nanoTime(); for (long remainingNanos = timeoutNanos; ; ) { try { return lock.tryLock(remainingNanos, TimeUnit.NANOSECONDS); } catch (InterruptedException interrupt) {
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Dec 04 18:22:01 UTC 2023 - 42.5K bytes - Viewed (0) -
android/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 @SuppressWarnings("GoodTime") // should accept a java.time.Duration
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Tue Apr 04 09:45:04 UTC 2023 - 14.4K 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/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) -
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) -
maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoExecutor.java
Registered: Wed Jun 12 09:55:16 UTC 2024 - Last Modified: Wed Feb 28 23:31:09 UTC 2024 - 20.7K 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)