Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for registerSharedResource (0.33 sec)

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

            then:
            noExceptionThrown()
        }
    
        def "locks on different shared resources can be concurrently held"() {
            given:
            sharedResourceLeaseRegistry.registerSharedResource('resource-a', 1)
            sharedResourceLeaseRegistry.registerSharedResource('resource-b', 1)
    
            and:
            def lockA = sharedResourceLeaseRegistry.getResourceLock('resource-a')
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:48:02 UTC 2023
    - 5K bytes
    - Viewed (0)
  2. platforms/core-runtime/base-services/src/main/java/org/gradle/internal/resources/SharedResourceLeaseRegistry.java

        public SharedResourceLeaseRegistry(ResourceLockCoordinationService coordinationService) {
            super(coordinationService);
            this.coordinationService = coordinationService;
        }
    
        public void registerSharedResource(String name, int leases) {
            sharedResources.put(name, new LeaseHolder(leases));
        }
    
        public ResourceLock getResourceLock(final String 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)
Back to top