<!-- 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 boolean isExcludedByClassLoader(String className, ClassLoader classLoader, String... onlyExtensionClassLoaderPackages) {
        if (onlyExtensionClassLoaderPackages != null) {
            for (String excludePackage : onlyExtensionClassLoaderPackages) {
                if (className.startsWith(excludePackage + ".")) {
                    
                    return !Objects.equals(ExtensionLoader.class.getClassLoader(), classLoader);
                }
            }
        }
        return false;
    }
    private void loadClass(Map<String, Class<?>> extensionClasses, java.net.URL resourceURL, Class<?> clazz, String name,
                           boolean overridden) {
        if (!type.isAssignableFrom(clazz)) {
            throw new IllegalStateException("Error occurred when loading extension class (interface: " +
                type + ", class line: " + clazz.getName() + "), class "
                + clazz.getName() + " is not subtype of interface.");
        }
        if (clazz.isAnnotationPresent(Adaptive.class)) {
            cacheAdaptiveClass(clazz, overridden);
        } else if (isWrapperClass(clazz)) {
            cacheWrapperClass(clazz);
        } else {
            if (StringUtils.isEmpty(name)) {
                name = findAnnotationName(clazz);
                if (name.length() == 0) {
                    throw new IllegalStateException("No such extension name for the class " + clazz.getName() + " in the config " + resourceURL);
                }
            }
            String[] names = NAME_SEPARATOR.split(name);