[PR #10390] [MERGED] Fix SUI race conditions when reloading settings #28018

Open
opened 2026-01-31 09:25:47 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/10390
Author: @lhecker
Created: 6/10/2021
Status: ✅ Merged
Merged: 6/11/2021
Merged by: @undefined

Base: main ← Head: dev/lhecker/sui-race-conditions


📝 Commits (3)

  • a193fae Fix SUI race conditions when reloading settings
  • ea60606 Address reviewer comments
  • 644f579 Merge remote-tracking branch 'origin/main' into dev/lhecker/sui-race-conditions

📊 Changes

6 files changed (+93 additions, -125 deletions)

View changed files

📝 src/cascadia/TerminalApp/AppLogic.cpp (+34 -55)
📝 src/cascadia/TerminalApp/AppLogic.h (+1 -5)
📝 src/cascadia/TerminalApp/TerminalPage.cpp (+18 -30)
📝 src/cascadia/TerminalApp/TerminalPage.h (+2 -4)
📝 src/cascadia/TerminalSettingsEditor/MainPage.cpp (+37 -30)
📝 src/cascadia/TerminalSettingsEditor/MainPage.h (+1 -1)

📄 Description

Summary of the Pull Request

This commit fixes various race conditions regarding the settings UI. It's unsafe to write to class members from background threads without acquiring mutexes or yielding to the main thread first.
By changing the settings reload code path to yield to the main thread early, we're able to cut down on code complexity and unsafe member accesses.

PR Checklist

Validation Steps Performed

  • Settings UI reloads without crashing ✔️

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/10390 **Author:** [@lhecker](https://github.com/lhecker) **Created:** 6/10/2021 **Status:** ✅ Merged **Merged:** 6/11/2021 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/lhecker/sui-race-conditions` --- ### 📝 Commits (3) - [`a193fae`](https://github.com/microsoft/terminal/commit/a193faeae28f2caea198c9867eb5cbf17fb6bdef) Fix SUI race conditions when reloading settings - [`ea60606`](https://github.com/microsoft/terminal/commit/ea60606ed9da303bde76d8edafe6a6b4cf7497e2) Address reviewer comments - [`644f579`](https://github.com/microsoft/terminal/commit/644f579ed42ae616ab82c0e6e6c0720786e8255f) Merge remote-tracking branch 'origin/main' into dev/lhecker/sui-race-conditions ### 📊 Changes **6 files changed** (+93 additions, -125 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalApp/AppLogic.cpp` (+34 -55) 📝 `src/cascadia/TerminalApp/AppLogic.h` (+1 -5) 📝 `src/cascadia/TerminalApp/TerminalPage.cpp` (+18 -30) 📝 `src/cascadia/TerminalApp/TerminalPage.h` (+2 -4) 📝 `src/cascadia/TerminalSettingsEditor/MainPage.cpp` (+37 -30) 📝 `src/cascadia/TerminalSettingsEditor/MainPage.h` (+1 -1) </details> ### 📄 Description ## Summary of the Pull Request This commit fixes various race conditions regarding the settings UI. It's unsafe to write to class members from background threads without acquiring mutexes or yielding to the main thread first. By changing the settings reload code path to yield to the main thread early, we're able to cut down on code complexity and unsafe member accesses. ## PR Checklist * [x] Closes #9273 * [x] I work here * [x] Tests added/passed ## Validation Steps Performed * Settings UI reloads without crashing ✔️ --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:25:47 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#28018