Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for getResourceLocksByCurrentThread (0.41 sec)

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

            then:
            registry.getResourceLocksByCurrentThread() == [lock]
        }
    
        def "does not get locks associated with other threads"() {
            when:
            def lock = registry.getResourceLock("test")
            inNewThread { registry.getResourceLock("another").tryLock() }
    
            and:
            lock.tryLock()
    
            then:
            registry.getResourceLocksByCurrentThread() == [lock]
        }
    
    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/resources/ResourceLockRegistry.java

    import java.util.Collection;
    
    public interface ResourceLockRegistry {
        /**
         * Get all of the resource locks held by the current thread.
         */
        Collection<? extends ResourceLock> getResourceLocksByCurrentThread();
    
        /**
         * Returns true if the registry has any locks that are being held by a thread.
         *
         * @return true if any locks in the registry are currently held.
         */
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:48:02 UTC 2023
    - 1.1K bytes
    - Viewed (0)
  3. platforms/core-runtime/base-services/src/main/java/org/gradle/internal/resources/AbstractResourceLockRegistry.java

        protected T getOrRegisterResourceLock(final K key, final ResourceLockProducer<K, T> producer) {
            return resourceLocks.getOrRegisterResourceLock(key, producer);
        }
    
        @Override
        public List<T> getResourceLocksByCurrentThread() {
            return ImmutableList.copyOf(detailsForCurrentThread().locks);
        }
    
        public <S> S whileDisallowingLockChanges(Factory<S> action) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:48:02 UTC 2023
    - 4.6K bytes
    - Viewed (0)
Back to top