<!-- If you need to report a security issue please visit https://github.com/apache/dubbo/security/policy -->

ExtensionLoader cannot be resumed after interruption.

```
java.lang.InterruptedException
  at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1302)
  at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:231)
  at org.apache.dubbo.common.utils.ClassLoaderResourceLoader.loadResources(ClassLoaderResourceLoader.java:55)
  at org.apache.dubbo.common.extension.ExtensionLoader.loadDirectory(ExtensionLoader.java:1005)
  at org.apache.dubbo.common.extension.ExtensionLoader.loadDirectory(ExtensionLoader.java:943)
  at org.apache.dubbo.common.extension.ExtensionLoader.loadExtensionClasses(ExtensionLoader.java:931)
  at org.apache.dubbo.common.extension.ExtensionLoader.getExtensionClasses(ExtensionLoader.java:913)
  at org.apache.dubbo.common.extension.ExtensionLoader.createExtension(ExtensionLoader.java:752)
  at org.apache.dubbo.common.extension.ExtensionLoader.getExtension(ExtensionLoader.java:548)
  at org.apache.dubbo.common.extension.ExtensionLoader.getExtension(ExtensionLoader.java:523)
  at org.apache.dubbo.rpc.protocol.injvm.InjvmInvoker.<init>(InjvmInvoker.java:74)
```
}
    }
    private void loadDirectoryInternal(Map<String, Class<?>> extensionClasses, LoadingStrategy loadingStrategy, String type) {
        String fileName = loadingStrategy.directory() + type;
        try {
            List<ClassLoader> classLoadersToLoad = new LinkedList<>();
            
            if (loadingStrategy.preferExtensionClassLoader()) {
                ClassLoader extensionLoaderClassLoader = ExtensionLoader.class.getClassLoader();
                if (ClassLoader.getSystemClassLoader() != extensionLoaderClassLoader) {
                    classLoadersToLoad.add(extensionLoaderClassLoader);
                }
            }
            if (specialSPILoadingStrategyMap.containsKey(type)){
                String internalDirectoryType = specialSPILoadingStrategyMap.get(type);
                
                if (!LoadingStrategy.ALL.equals(internalDirectoryType)
                    && !internalDirectoryType.equals(loadingStrategy.getName())){
                    return;
                }
                classLoadersToLoad.clear();
                classLoadersToLoad.add(ExtensionLoader.class.getClassLoader());
            }else {
                
                Set<ClassLoader> classLoaders = scopeModel.getClassLoaders();
                if (CollectionUtils.isEmpty(classLoaders)) {
                    Enumeration<java.net.URL> resources = ClassLoader.getSystemResources(fileName);
                    if (resources != null) {
                        while (resources.hasMoreElements()) {
                            loadResource(extensionClasses, null, resources.nextElement(), loadingStrategy.overridden(),