дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-29 22:02:59 +02:00
PluginHost could deadlock: ensure_active held plugin.runtime across Wasm instantiation and activate(), where plugins call subscribe* (shared.subscriptions), while flush_events_at took queues -> plugins -> subscriptions -> runtime. post_window_events then blocked behind queues on the WebKit main thread, freezing the app (Not Responding). - A per-plugin `activating` mutex serializes start/stop; `runtime` is now a leaf lock that never spans activation or host callbacks. stop() marks the plugin Disabled under it so a concurrent event can't reactivate it mid-stop. - flush_events_at, queue_watched_changes, post_events_from and remote_languages snapshot plugins/subscriptions before taking queues instead of nesting the locks. - plugin_post_events and plugin_set_active_file run off the main thread (async + spawn_blocking); the frontend keeps their order with a FIFO chain, snapshotting the editor context at call time. Closes #6774 Co-authored-by: dengliu <[email protected]>