SIGN IN SIGN UP

fix: resolve SideEffectNotAllowedException in intention previews (#11894)

* fix: use Dispatchers.Default to avoid SideEffectNotAllowedException in JetBrains intention previews

DocumentChangeTracker and ActiveHandlerManager used Dispatchers.Main which
schedules work via INVOKE_LATER. JetBrains forbids this during intention
preview computation (autocomplete, inspections), throwing
SideEffectNotAllowedException. Neither class requires EDT for its coroutine
work, so switching to Dispatchers.Default resolves the issue.

Fixes #9463, #8035

* fix: use limitedParallelism(1) to prevent race conditions

Dispatchers.Default allows concurrent execution on a thread pool,
which breaks thread-safety for shared mutable state that was previously
serialized on the Main/EDT dispatcher. Using limitedParallelism(1)
preserves single-threaded execution while still avoiding the
SideEffectNotAllowedException from Dispatchers.Main.
D
Dallin Romney committed
581980e31e5004cad0fbf12f92666aac46d4e2c6
Parent: b48183c
Committed by GitHub <noreply@github.com> on 3/26/2026, 9:37:07 PM