Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 474 for lock1 (0.11 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. subprojects/core/src/testFixtures/groovy/org/gradle/util/ports/ReservedPortRange.groovy

     * limitations under the License.
     */
    
    package org.gradle.util.ports
    
    import java.util.concurrent.locks.Lock
    import java.util.concurrent.locks.ReentrantLock
    
    
    class ReservedPortRange {
        final int startPort
        final int endPort
        private final Lock lock = new ReentrantLock()
        PortDetector portDetector = new DefaultPortDetector()
        final List<Integer> allocated = []
        int current
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Aug 10 14:46:58 UTC 2017
    - 2.8K bytes
    - Viewed (0)
  7. subprojects/core/src/test/groovy/org/gradle/execution/plan/AbstractExecutionPlanSpec.groovy

            final Thread owner = Thread.currentThread()
            final ProjectInternal project
            boolean locked
            final Collection<MockLock> locks
    
            MockLock(ProjectInternal project, Collection<MockLock> locks) {
                this.locks = locks
                this.project = project
            }
    
            @Override
            boolean isLockedByCurrentThread() {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Mar 24 11:56:02 UTC 2023
    - 7.3K bytes
    - Viewed (0)
  8. internal/dsync/lock-args_gen_test.go

    Klaus Post <******@****.***> 1700528975 -0800
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Nov 21 01:09:35 UTC 2023
    - 4.4K bytes
    - Viewed (0)
  9. testing/internal-integ-testing/src/main/groovy/org/gradle/test/fixtures/server/http/SendPartialResponseThenBlock.java

    import java.io.IOException;
    import java.time.Duration;
    import java.util.concurrent.TimeUnit;
    import java.util.concurrent.locks.Condition;
    import java.util.concurrent.locks.Lock;
    
    class SendPartialResponseThenBlock implements BlockingHttpServer.BlockingRequest, ResponseProducer {
        private final byte[] content;
        private final Lock lock;
        private final Duration timeout;
        private final Condition condition;
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 07:21:38 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  10. platforms/core-runtime/concurrent/src/main/java/org/gradle/internal/concurrent/InterruptibleRunnable.java

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    
    package org.gradle.internal.concurrent;
    
    import java.util.concurrent.locks.Lock;
    import java.util.concurrent.locks.ReentrantLock;
    
    /**
     * Wraps a runnable so that it can be interrupted. Useful when {@link java.util.concurrent.Future} is not available or its behavior is not desired.
     *
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 11 19:07:35 UTC 2024
    - 2.4K bytes
    - Viewed (0)
Back to top