Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for getResourceLock (0.15 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)
Back to top