mirror of
https://github.com/microsoft/terminal.git
synced 2025-12-19 18:11:39 -05:00
Remove Monarch/Peasant & Make UI single-threaded (#18215)
As before, a minor refactor: * I started off by removing the Monarch/Peasant with the goal of moving it into and deduplicating its functionality with `WindowEmperor`. * Since I needed a replacement for the Monarch (= ensures that there's a single instance), I wrote single-instance code with a NT mutex and by yeeting data across processes with `WM_COPYDATA`. * This resulted in severe threading issues, because it now started up way faster. The more I tried to solve them the deeper I had to dig, because you can't just put a mutex around `CascadiaSettings`. I then tried to seeif WinUI can run multiple windows on a single thread and, as it turns out, it can. So, I removed the multi- from the window threading. * At this point I had dig about 1 mile deep and brought no ladder. So, to finish it up, I had to clean up the entire eventing system around `WindowEmperor`, cleaned up all the coroutines, and cleaned up all the callbacks. Closes #16183 Closes #16221 Closes #16487 Closes #16532 Closes #16733 Closes #16755 Closes #17015 Closes #17360 Closes #17420 Closes #17457 Closes #17799 Closes #17976 Closes #18057 Closes #18084 Closes #18169 Closes #18176 Closes #18191 ## Validation Steps Performed * It does not crash ✅ * New/close tab ✅ * New/close window ✅ * Move tabs between windows ✅ * Split tab into new window ✅ * Persist windows on exit / restore startup ✅
This commit is contained in:
@@ -170,7 +170,7 @@ function Invoke-OpenConsoleTests()
|
||||
[switch]$FTOnly,
|
||||
|
||||
[parameter(Mandatory=$false)]
|
||||
[ValidateSet('host', 'interactivityWin32', 'terminal', 'adapter', 'feature', 'uia', 'textbuffer', 'til', 'types', 'terminalCore', 'terminalApp', 'localTerminalApp', 'unitSettingsModel', 'unitRemoting', 'unitControl', 'winconpty')]
|
||||
[ValidateSet('host', 'interactivityWin32', 'terminal', 'adapter', 'feature', 'uia', 'textbuffer', 'til', 'types', 'terminalCore', 'terminalApp', 'localTerminalApp', 'unitSettingsModel', 'unitControl', 'winconpty')]
|
||||
[string]$Test,
|
||||
|
||||
[parameter(Mandatory=$false)]
|
||||
|
||||
@@ -23,7 +23,6 @@ if "%PLATFORM%" == "Win32" (
|
||||
%OPENCON%\bin\%PLATFORM%\%_LAST_BUILD_CONF%\Types.Unit.Tests.dll ^
|
||||
%OPENCON%\bin\%PLATFORM%\%_LAST_BUILD_CONF%\til.unit.tests.dll ^
|
||||
%OPENCON%\bin\%PLATFORM%\%_LAST_BUILD_CONF%\UnitTests_TerminalApp\Terminal.App.Unit.Tests.dll ^
|
||||
%OPENCON%\bin\%PLATFORM%\%_LAST_BUILD_CONF%\UnitTests_Remoting\Remoting.Unit.Tests.dll ^
|
||||
%OPENCON%\bin\%PLATFORM%\%_LAST_BUILD_CONF%\UnitTests_Control\Control.Unit.Tests.dll ^
|
||||
%_TestHostAppPath%\TerminalApp.LocalTests.dll ^
|
||||
%*
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
<test name="terminalApp" type="unit" binary="UnitTests_TerminalApp\Terminal.App.Unit.Tests.dll" />
|
||||
<test name="localTerminalApp" type="unit" binary="TestHostApp\TerminalApp.LocalTests.dll" />
|
||||
<test name="unitSettingsModel" type="unit" binary="UnitTests_SettingsModel\SettingsModel.Unit.Tests.dll" isolatedTaef="true" />
|
||||
<test name="unitRemoting" type="unit" binary="UnitTests_Remoting\Remoting.Unit.Tests.dll" />
|
||||
<test name="unitControl" type="unit" binary="UnitTests_Control\Control.Unit.Tests.dll" />
|
||||
<test name="interactivityWin32" type="unit" binary="Conhost.Interactivity.Win32.Unit.Tests.dll" />
|
||||
<test name="terminal" type="unit" binary="ConParser.Unit.Tests.dll" />
|
||||
|
||||
Reference in New Issue
Block a user