- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 150 for Synchronizer (0.18 sec)
-
platforms/core-execution/persistent-cache/src/main/java/org/gradle/cache/internal/Synchronizer.java
// TODO Replace the use of this with synchronized caches from Guava @NonNullApi public class Synchronizer { private final Lock lock = new ReentrantLock(); public <T> T synchronize(Supplier<T> factory) { lock.lock(); try { return factory.get(); } finally { lock.unlock(); } } public void synchronize(Runnable operation) { lock.lock();
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Thu Apr 11 19:07:35 UTC 2024 - 1.3K bytes - Viewed (0) -
platforms/core-execution/persistent-cache/src/main/java/org/gradle/cache/internal/CacheAccessSerializer.java
final private Synchronizer synchronizer = new Synchronizer(); final private Cache<K, V> cache; public CacheAccessSerializer(Cache<K, V> cache) { this.cache = cache; } @Override public V get(final K key, final Function<? super K, ? extends V> factory) { return synchronizer.synchronize(() -> cache.get(key, factory)); } @Override
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Thu Apr 11 19:07:35 UTC 2024 - 1.4K bytes - Viewed (0) -
testing/internal-testing/src/test/groovy/org/gradle/test/fixtures/concurrent/ConcurrentSpecTest.groovy
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Thu Apr 04 07:21:38 UTC 2024 - 8.7K bytes - Viewed (0) -
testing/internal-testing/src/main/groovy/org/gradle/test/fixtures/work/TestWorkerLeaseService.groovy
action.run() } @Override void runAsUnmanagedWorkerThread(Runnable action) { action.run() } @Override Synchronizer newResource() { return new Synchronizer() { @Override void withLock(Runnable action) { action.run() } @Override <T> T withLock(Factory<T> action) {
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/core-runtime/base-services/src/main/java/org/gradle/internal/work/WorkerLeaseService.java
* and the method will block until the locks are reacquired. */ void withoutLock(ResourceLock lock, Runnable runnable); Synchronizer newResource();
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Thu Apr 04 06:02:18 UTC 2024 - 3.4K bytes - Viewed (0) -
src/sync/waitgroup.go
if race.Enabled { if delta < 0 { // Synchronize decrements with Wait. race.ReleaseMerge(unsafe.Pointer(wg)) } race.Disable() defer race.Enable() } state := wg.state.Add(uint64(delta) << 32) v := int32(state >> 32) w := uint32(state) if race.Enabled && delta > 0 && v == int32(delta) { // The first increment must be synchronized with Wait. // Need to model this as a read, because there can be
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 21:14:51 UTC 2024 - 4K bytes - Viewed (0) -
platforms/core-configuration/configuration-cache/src/main/kotlin/org/gradle/internal/cc/impl/fingerprint/ScopedFingerprintWriter.kt
) : Closeable { override fun close() { // we synchronize access to all resources used by callbacks // in case there was still an event being dispatched at closing time. synchronized(writeContext) { unsafeWrite(null) writeContext.close() } } fun write(value: T, trace: PropertyTrace? = null) { synchronized(writeContext) { withPropertyTrace(trace) {
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Sat Jun 08 11:29:25 UTC 2024 - 1.9K bytes - Viewed (0) -
src/runtime/proflabel.go
// the acquire in profBuf.read synchronizes with *all* prior // setProfLabel operations, not just the most recent one. This // is important because profBuf.read will observe different // labels set by different setProfLabel operations on // different goroutines, so it needs to synchronize with all // of them (this wouldn't be an issue if we could synchronize // on &getg().labels since we would synchronize with each
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 16:25:21 UTC 2024 - 2.1K bytes - Viewed (0) -
subprojects/core-api/src/main/java/org/gradle/api/internal/cache/CacheConfigurationsInternal.java
void finalizeConfiguration(Gradle gradle); /** * Synchronizes the property values of the provided cache configurations with those of this cache configuration * by setting the provided configuration's properties to be backed by the properties of this configuration. */ void synchronize(CacheConfigurationsInternal cacheConfigurationsInternal);
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Tue Mar 26 20:02:29 UTC 2024 - 2.2K bytes - Viewed (0) -
platforms/core-execution/persistent-cache/src/main/java/org/gradle/cache/internal/ProducerGuard.java
import java.util.HashSet; import java.util.Set; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; import java.util.function.Supplier; /** * Synchronizes access to some resource, by making sure that 2 threads do not try to produce it at the same time. * The resource to be accessed is represented by a key, and the factory is whatever needs to be done to produce it.
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Apr 26 16:02:31 UTC 2024 - 4.7K bytes - Viewed (0)