Online Dev Tools์ถ์ฒ: JetBrains Blog์กฐํ์ 1
UI Freezes and the Dangers of Non-Cancellable Read Actions in Background Threads
By Yuriy Artamonov2026๋
3์ 18์ผ
**UI Freezes and the Dangers of Non-Cancellable Read Actions in Background Threads**
In JetBrains IDEs, UI freezes are often blamed on โheavy work on the EDT,โ but our recent investigations show another common culprit in plugins: long, non-cancellable read actions running in background threads. We receive a lot of freeze reports via our automated exceptions reporting system, and many reports actually show problems in plugins that contain that single erroneous pattern. Letโs try to highlight this problem arising from non-cancellable code and figure out how to fix it. A real-world example Letโs look at the following stack traces that come from a Package Checker plugin freeze. Note how a background thread “DefaultDispatcher-worker-27” ends up executing ReadAction.compute: "AWT-EventQueue-0" prio=0 tid=0x0 nid=0x0 waiting on condition java.lang.Thread.State: TIMED_WAITING on com.intellij.openapi.progress.util.EternalEventStealer@1356e599 at java.base@21.0.8/java.lang.Object.wait0(Native Method) at java.base@21.0.8/java.lang.Object.wait(Object.java:366) at com.intellij.openapi.progress.util.EternalEventStealer.dispatchAllEventsForTimeout(SuvorovProgress.kt:261) at com.intellij.openapi.progress.util.SuvorovProgress.processInvocationEventsWithoutDialog(SuvorovProgress.kt:125) at com.intellij.openapi.progress.util.SuvorovProgress.dispatchEventsUntilComputationCompletes(SuvorovProgress.kt:73) at com.intellij.openapi.application.impl.ApplicationImpl.lambda$postInit$14(ApplicationImpl.java:1434) at com.intellij.openapi.application.impl.ApplicationImpl$$Lambda/0x000001fafa58b530.invoke(Unknown Source) at com.intellij.platform.locking.impl.RunSuspend.await(NestedLocksThreadingSupport.kt:1517) .....
---
**[devsupporter ํด์ค]**
์ด ๊ธฐ์ฌ๋ JetBrains Blog์์ ์ ๊ณตํ๋ ์ต์ ๊ฐ๋ฐ ๋ํฅ์ ๋๋ค. ๊ด๋ จ ๋๊ตฌ๋ ๊ธฐ์ ์ ๋ํด ๋ ์์๋ณด์๋ ค๋ฉด ์๋ณธ ๋งํฌ๋ฅผ ์ฐธ๊ณ ํ์ธ์.
In JetBrains IDEs, UI freezes are often blamed on โheavy work on the EDT,โ but our recent investigations show another common culprit in plugins: long, non-cancellable read actions running in background threads. We receive a lot of freeze reports via our automated exceptions reporting system, and many reports actually show problems in plugins that contain that single erroneous pattern. Letโs try to highlight this problem arising from non-cancellable code and figure out how to fix it. A real-world example Letโs look at the following stack traces that come from a Package Checker plugin freeze. Note how a background thread “DefaultDispatcher-worker-27” ends up executing ReadAction.compute: "AWT-EventQueue-0" prio=0 tid=0x0 nid=0x0 waiting on condition java.lang.Thread.State: TIMED_WAITING on com.intellij.openapi.progress.util.EternalEventStealer@1356e599 at java.base@21.0.8/java.lang.Object.wait0(Native Method) at java.base@21.0.8/java.lang.Object.wait(Object.java:366) at com.intellij.openapi.progress.util.EternalEventStealer.dispatchAllEventsForTimeout(SuvorovProgress.kt:261) at com.intellij.openapi.progress.util.SuvorovProgress.processInvocationEventsWithoutDialog(SuvorovProgress.kt:125) at com.intellij.openapi.progress.util.SuvorovProgress.dispatchEventsUntilComputationCompletes(SuvorovProgress.kt:73) at com.intellij.openapi.application.impl.ApplicationImpl.lambda$postInit$14(ApplicationImpl.java:1434) at com.intellij.openapi.application.impl.ApplicationImpl$$Lambda/0x000001fafa58b530.invoke(Unknown Source) at com.intellij.platform.locking.impl.RunSuspend.await(NestedLocksThreadingSupport.kt:1517) .....
---
**[devsupporter ํด์ค]**
์ด ๊ธฐ์ฌ๋ JetBrains Blog์์ ์ ๊ณตํ๋ ์ต์ ๊ฐ๋ฐ ๋ํฅ์ ๋๋ค. ๊ด๋ จ ๋๊ตฌ๋ ๊ธฐ์ ์ ๋ํด ๋ ์์๋ณด์๋ ค๋ฉด ์๋ณธ ๋งํฌ๋ฅผ ์ฐธ๊ณ ํ์ธ์.
