Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for getResourceLock (0.16 sec)

  1. platforms/core-runtime/base-services/src/test/groovy/org/gradle/internal/resources/AbstractResourceLockRegistryTest.groovy

            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:
            def lock = registry.getResourceLock("test")
    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/test/groovy/org/gradle/internal/resources/SharedResourceLeaseRegistryTest.groovy

            sharedResourceLeaseRegistry.registerSharedResource('resource-b', 1)
    
            and:
            def lockA = sharedResourceLeaseRegistry.getResourceLock('resource-a')
            def lockB = sharedResourceLeaseRegistry.getResourceLock('resource-b')
    
            when:
            coordinationService.withStateLock(lock(lockA))
            coordinationService.withStateLock(lock(lockB))
    
            then:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:48:02 UTC 2023
    - 5K bytes
    - Viewed (0)
  3. platforms/core-runtime/base-services/src/main/java/org/gradle/internal/work/ConditionalExecutionQueue.java

        /**
         * Submit a new conditional execution to the queue.  The execution will occur asynchronously when the provided
         * resource lock (see {@link ConditionalExecution#getResourceLock()}) can be acquired.  On completion,
         * {@link ConditionalExecution#complete()} will be called.
         */
        void submit(ConditionalExecution<T> execution);
    
        /**
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:48:02 UTC 2023
    - 1.5K bytes
    - Viewed (0)
  4. platforms/core-runtime/base-services/src/main/java/org/gradle/internal/resources/SharedResourceLeaseRegistry.java

        }
    
        public void registerSharedResource(String name, int leases) {
            sharedResources.put(name, new LeaseHolder(leases));
        }
    
        public ResourceLock getResourceLock(final String sharedResource) {
            String displayName = "lease for " + sharedResource;
            return new DefaultLease(displayName, coordinationService, this, sharedResources.get(sharedResource));
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Dec 11 13:37:56 UTC 2023
    - 1.5K bytes
    - Viewed (0)
  5. platforms/core-runtime/base-services/src/main/java/org/gradle/internal/resources/SharedResource.java

     */
    
    package org.gradle.internal.resources;
    
    public interface SharedResource {
        /**
         * @return The maximum usage, or -1 when there is no limit.
         */
        int getMaxUsages();
    
        ResourceLock getResourceLock();
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:48:02 UTC 2023
    - 834 bytes
    - Viewed (0)
  6. subprojects/core/src/main/java/org/gradle/api/services/internal/DefaultBuildServicesRegistry.java

            }
    
            @Override
            public int getMaxUsages() {
                return maxUsages;
            }
    
            @Override
            public ResourceLock getResourceLock() {
                return leaseRegistry.getResourceLock(name);
            }
        }
    
        public static abstract class DefaultServiceRegistration<T extends BuildService<P>, P extends BuildServiceParameters> implements BuildServiceRegistration<T, P> {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Jun 06 19:15:45 UTC 2024
    - 16.7K bytes
    - Viewed (0)
Back to top