<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/ui-freezes-and-the-dangers-of-non-cancellable-read-actions-in-background-threads-htk2rm2bb" -->

---
title: UI Freezes and the Dangers of Non-Cancellable Read...
description: UI freezes in JetBrains IDEs are often caused not just by heavy work on the Event Dispatch Thread, but by long, non-cancellable read actions running in...
canonical: https://daily.dev/posts/ui-freezes-and-the-dangers-of-non-cancellable-read-actions-in-background-threads-htk2rm2bb
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: UI Freezes and the Dangers of Non-Cancellable Read Actions in Background Threads | daily.dev
og:description: UI freezes in JetBrains IDEs are often caused not just by heavy work on the Event Dispatch Thread, but by long, non-cancellable read actions running in...
og:url: https://daily.dev/posts/ui-freezes-and-the-dangers-of-non-cancellable-read-actions-in-background-threads-htk2rm2bb
og:image: https://api.daily.dev/og/posts/hTK2RM2bB.png
og:image:alt: UI Freezes and the Dangers of Non-Cancellable Read Actions in Background Threads
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# UI Freezes and the Dangers of Non-Cancellable Read Actions in Background Threads

**[JetBrains](https://daily.dev/sources/jetbrains)** · 7 min read · 0 upvotes · 0 comments

## Summary

UI freezes in JetBrains IDEs are often caused not just by heavy work on the Event Dispatch Thread, but by long, non-cancellable read actions running in background threads. These read actions hold the platform's reader-writer lock, blocking all pending write actions and freezing the UI until they complete. The post explains the underlying locking mechanism, shows a real-world freeze example from the Package Checker plugin, and provides concrete alternatives: using cancellable read action APIs like `readAction{}` (coroutines), `ReadAction.nonBlocking{}`, or splitting work into small chunks with `ProgressManager.checkCanceled()`. It also notes that as of 2026.1, `runReadAction` and `ReadAction.compute` are being deprecated in favor of explicitly named blocking variants, encouraging plugin authors to migrate to cancellable patterns.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.jetbrains.com/platform/2026/03/ui-freezes-and-the-dangers-of-non-cancellable-read-actions-in-background-threads/>

## Similar posts on daily.dev

- [Livestream: UI Freezes in JetBrains IDE Plugins and How to Avoid Them](https://daily.dev/posts/livestream-ui-freezes-in-jetbrains-ide-plugins-and-how-to-avoid-them-furyesfjy) · JetBrains · 0 upvotes · 0 comments
- [The Road to Responsive IntelliJ-Based IDEs](https://daily.dev/posts/the-road-to-responsive-intellij-based-ides-5gjoosafb) · JetBrains · 29 upvotes · 0 comments
- [The Race Condition Hiding in Your Flaky Test](https://daily.dev/posts/the-race-condition-hiding-in-your-flaky-test-l61f8j8cx) · Mabl Engineering Blog · 0 upvotes · 0 comments
- [UI freeze reports are now available in JetBrains Marketplace](https://daily.dev/posts/ui-freeze-reports-are-now-available-in-jetbrains-marketplace-4au8m3wpx) · JetBrains · 1 upvotes · 0 comments
- [Coroutines, the Right Way: Where Your Money Code Actually Runs](https://daily.dev/posts/coroutines-the-right-way-where-your-money-code-actually-runs-hckmygkn4) · Medium · 0 upvotes · 0 comments

---

Tags: [#performance](https://daily.dev/tags/performance), [#kotlin](https://daily.dev/tags/kotlin)

[View this post on daily.dev](https://daily.dev/posts/ui-freezes-and-the-dangers-of-non-cancellable-read-actions-in-background-threads-htk2rm2bb)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"UI Freezes and the Dangers of Non-Cancellable Read Actions in Background Threads","url":"https://daily.dev/posts/ui-freezes-and-the-dangers-of-non-cancellable-read-actions-in-background-threads-htk2rm2bb","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/ui-freezes-and-the-dangers-of-non-cancellable-read-actions-in-background-threads-htk2rm2bb"},"datePublished":"2026-03-17T20:43:50.251Z","dateModified":"2026-08-24T06:57:19.395Z","description":"UI freezes in JetBrains IDEs are often caused not just by heavy work on the Event Dispatch Thread, but by long, non-cancellable read actions running in...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/62f6c55b418c984fbb7206ea66da6a1f?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/62f6c55b418c984fbb7206ea66da6a1f?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"JetBrains","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"JetBrains","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/53ecf0c676f34b3896ee109609d91efa","url":"https://daily.dev/sources/jetbrains"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/ui-freezes-and-the-dangers-of-non-cancellable-read-actions-in-background-threads-htk2rm2bb","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"performance,kotlin","timeRequired":"PT7M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"JetBrains","item":"https://daily.dev/sources/jetbrains"},{"@type":"ListItem","position":3,"name":"UI Freezes and the Dangers of Non-Cancellable Read Actions in Background Threads"}]}
```

