<!-- 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)
```
* @see ExtensionDirector#getExtensionLoader(java.lang.Class)
     * @deprecated get extension loader from extension director of some module.
     */
    @Deprecated
    public static <T> ExtensionLoader<T> getExtensionLoader(Class<T> type) {
        return ApplicationModel.defaultModel().getDefaultModule().getExtensionLoader(type);
    }
    @Deprecated
    public static void resetExtensionLoader(Class type) {
    }
    public void destroy() {
        if (!destroyed.compareAndSet(false, true)) {
            return;
        }
        
        extensionInstances.forEach((type, instance) -> {
            if (instance instanceof Disposable) {
                Disposable disposable = (Disposable) instance;
                try {
                    disposable.destroy();
                } catch (Exception e) {
                    logger.error("Error destroying extension " + disposable, e);
                }
            }
        });
        extensionInstances.clear();
        
        for (Holder<Object> holder : cachedInstances.values()) {
            Object wrappedInstance = holder.get();
            if (wrappedInstance instanceof Disposable) {