How to call DynamicPlugins.unloadPlugin() without triggering SlowOperations assertions on EDT?
Hi there, I use the DynamicPlugins.unloadPlugin() api. It is allowed from Event Dispatch Thread (EDT) only, but it will throw java.lang.Throwable: Slow operations are prohibited on EDT. See SlowOperations.assertSlowOperationsAreAllowed javadoc.
Now I call it like this, but it will throw java.lang.Throwable: Slow operations are prohibited on EDT. See SlowOperations.assertSlowOperationsAreAllowed javadoc..How to resolve it ?
``````
ApplicationManager.getApplication().invokeLater(() -> {
ReadAction.run(() -> {
descriptorImpl.setEnabled(false);
DynamicPlugins.INSTANCE.unloadPlugin(descriptorImpl)
});
});
``````
请先登录再写评论。