591a67111e
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request <!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> ## References #11083 #11143 <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [ ] Closes #xxx * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [x] Tests added/passed * [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx * [ ] Schema updated. * [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx <!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments While testing the save/quit features a number of issues were found that were caused by poor synchronization on the monarch, resulting in various unexpected crashes. Because this uses std collections, and I didn't see any builtin winrt multithreaded containers I went with the somewhat heavy-handed mutex approach. e.g. - https://github.com/microsoft/terminal/pull/11083#issuecomment-916218353 - https://github.com/microsoft/terminal/pull/11083#issuecomment-916220521 - https://github.com/microsoft/terminal/pull/11143/#discussion_r704738433 This also makes it so that on quit peasants don't try to become the monarch, and the monarch closes their peasant last to prevent elections from happening. <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed Create many windows (hold down ctrl-shift-n) then use the quit action from peasants/the monarch to make sure everything closes properly. |
||
---|---|---|
.. | ||
dll | ||
Resources/en-US | ||
CommandlineArgs.cpp | ||
CommandlineArgs.h | ||
FindTargetWindowArgs.cpp | ||
FindTargetWindowArgs.h | ||
init.cpp | ||
Microsoft.Terminal.RemotingLib.vcxproj | ||
Monarch.cpp | ||
Monarch.h | ||
Monarch.idl | ||
MonarchFactory.h | ||
packages.config | ||
pch.cpp | ||
pch.h | ||
Peasant.cpp | ||
Peasant.h | ||
Peasant.idl | ||
ProposeCommandlineResult.cpp | ||
ProposeCommandlineResult.h | ||
RenameRequestArgs.cpp | ||
RenameRequestArgs.h | ||
SummonWindowBehavior.cpp | ||
SummonWindowBehavior.h | ||
SummonWindowSelectionArgs.cpp | ||
SummonWindowSelectionArgs.h | ||
WindowActivatedArgs.cpp | ||
WindowActivatedArgs.h | ||
WindowManager.cpp | ||
WindowManager.h | ||
WindowManager.idl |