Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 928 for lock1 (0.09 sec)

  1. platforms/core-runtime/base-services/src/main/java/org/gradle/internal/resources/DefaultResourceLockCoordinationService.java

        }
    
        /**
         * Attempts an atomic, blocking lock on the provided resource locks.
         */
        public static InternalTransformer<ResourceLockState.Disposition, ResourceLockState> lock(Iterable<? extends ResourceLock> resourceLocks) {
            return new AcquireLocks(resourceLocks, true);
        }
    
        /**
         * Attempts an atomic, blocking lock on the provided resource locks.
         */
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 11 17:16:10 UTC 2024
    - 11.9K bytes
    - Viewed (0)
  2. platforms/ide/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/async/ServiceLifecycle.java

    import java.util.Map;
    import java.util.concurrent.locks.Condition;
    import java.util.concurrent.locks.Lock;
    import java.util.concurrent.locks.ReentrantLock;
    
    /**
     * Manages the lifecycle of some thread-safe service or resource.
     */
    public class ServiceLifecycle implements AsyncStoppable {
        private enum State {RUNNING, STOPPING, STOPPED}
    
        private final String displayName;
        private final Lock lock = new ReentrantLock();
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 11 19:07:55 UTC 2024
    - 4K bytes
    - Viewed (0)
  3. platforms/core-execution/persistent-cache/src/main/java/org/gradle/cache/internal/Synchronizer.java

    import java.util.concurrent.locks.Lock;
    import java.util.concurrent.locks.ReentrantLock;
    import java.util.function.Supplier;
    
    // 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();
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 11 19:07:35 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  4. src/runtime/lock_sema.go

    	return atomic.Loaduintptr(&l.key) > locked
    }
    
    func lock(l *mutex) {
    	lockWithRank(l, getLockRank(l))
    }
    
    func lock2(l *mutex) {
    	gp := getg()
    	if gp.m.locks < 0 {
    		throw("runtime·lock: lock count")
    	}
    	gp.m.locks++
    
    	// Speculative grab for lock.
    	if atomic.Casuintptr(&l.key, 0, locked) {
    		return
    	}
    	semacreate(gp.m)
    
    	timer := &lockTimer{lock: l}
    	timer.begin()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:57:37 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  5. internal/dsync/dsync-server_test.go

    	}
    }
    
    const WriteLock = -1
    
    type lockServer struct {
    	mutex sync.Mutex
    	// Map of locks, with negative value indicating (exclusive) write lock
    	// and positive values indicating number of read locks
    	lockMap map[string]int64
    
    	// Refresh returns lock not found if set to true
    	lockNotFound bool
    
    	// Set to true if you want peers servers to do not respond
    	responseDelay int64
    }
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jan 23 16:46:37 UTC 2023
    - 8.3K bytes
    - Viewed (0)
  6. platforms/core-runtime/base-services/src/test/groovy/org/gradle/internal/resources/AbstractResourceLockRegistryTest.groovy

        def "can get a lock associated with the current thread"() {
            when:
            def lock = registry.getResourceLock("test")
    
            then:
            lock instanceof TestTrackedResourceLock
    
            when:
            lock.tryLock()
    
            then:
            registry.getResourceLocksByCurrentThread() == [lock]
        }
    
        def "does not get locks associated with other threads"() {
            when:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:48:02 UTC 2023
    - 2.6K bytes
    - Viewed (0)
  7. platforms/core-runtime/base-services/src/main/java/org/gradle/internal/work/Synchronizer.java

         *
         * Fails if the current thread is already holding the resource lock. May release project locks prior to blocking, as per {@link WorkerLeaseService#blocking(Runnable)}.
         */
        void withLock(Runnable action);
    
        /**
         * Runs the given action while holding the associated resource lock, blocking until the lock can be acquired.
         *
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:48:02 UTC 2023
    - 1.4K bytes
    - Viewed (0)
  8. platforms/ide/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/loader/SynchronizedToolingImplementationLoader.java

    import org.gradle.tooling.internal.protocol.InternalBuildProgressListener;
    
    import java.io.Closeable;
    import java.util.concurrent.locks.Lock;
    import java.util.concurrent.locks.ReentrantLock;
    
    public class SynchronizedToolingImplementationLoader implements ToolingImplementationLoader, Closeable {
        private final Lock lock = new ReentrantLock();
        private final ToolingImplementationLoader delegate;
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Sep 26 14:49:20 UTC 2023
    - 2.8K bytes
    - Viewed (0)
  9. subprojects/core/src/testFixtures/groovy/org/gradle/util/ports/AbstractAvailablePortAllocator.groovy

    import com.google.common.collect.ImmutableList
    import org.gradle.internal.Pair
    
    import java.util.concurrent.locks.Lock
    import java.util.concurrent.locks.ReentrantLock
    
    abstract class AbstractAvailablePortAllocator implements PortAllocator {
        private final List<ReservedPortRange> reservations = []
        protected final Lock lock = new ReentrantLock()
        @VisibleForTesting
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 05 16:58:31 UTC 2022
    - 3.1K bytes
    - Viewed (0)
  10. platforms/core-runtime/daemon-protocol/src/main/java/org/gradle/tooling/internal/provider/serialization/ClassLoaderCache.java

    import javax.annotation.Nullable;
    import javax.annotation.concurrent.ThreadSafe;
    import java.util.UUID;
    import java.util.concurrent.locks.Lock;
    import java.util.concurrent.locks.ReentrantLock;
    
    @ThreadSafe
    @ServiceScope(Scope.Global.class)
    public class ClassLoaderCache {
        private final Lock lock = new ReentrantLock();
        private final Cache<ClassLoader, ClassLoaderDetails> classLoaderDetails;
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue May 14 00:13:09 UTC 2024
    - 3.4K bytes
    - Viewed (0)
Back to top