mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-17 09:58:00 +00:00
Record why the chat splitter timer stays off the renderer thread
This commit is contained in:
1 file changed
+10
@@ -39,6 +39,16 @@ public partial class Chat : MSGComponentBase
|
|||||||
|
|
||||||
this.splitterPosition = this.SettingsManager.ConfigurationData.Workspace.SplitterPosition;
|
this.splitterPosition = this.SettingsManager.ConfigurationData.Workspace.SplitterPosition;
|
||||||
this.splitterSaveTimer.AutoReset = false;
|
this.splitterSaveTimer.AutoReset = false;
|
||||||
|
//
|
||||||
|
// Mind that this handler deliberately stays off the renderer thread, although it writes the
|
||||||
|
// configuration data from a thread pool thread. The position is a single double, and every
|
||||||
|
// target we ship is 64 bit, so the write cannot tear -- and the worst a lost one could do is
|
||||||
|
// a splitter standing somewhere else after the next start. What a jump to the dispatcher
|
||||||
|
// would cost instead is paid by the user: storing the settings serializes all of them and
|
||||||
|
// writes two files, and it would do that in the very queue which draws the drag they are in
|
||||||
|
// the middle of. The splitter then stutters under their hand. Whoever synchronizes the
|
||||||
|
// configuration data one day should do it without moving that work onto the renderer.
|
||||||
|
//
|
||||||
this.splitterSaveTimer.Elapsed += (_, _) =>
|
this.splitterSaveTimer.Elapsed += (_, _) =>
|
||||||
{
|
{
|
||||||
this.SettingsManager.ConfigurationData.Workspace.SplitterPosition = this.splitterPosition;
|
this.SettingsManager.ConfigurationData.Workspace.SplitterPosition = this.splitterPosition;
|
||||||
|
|||||||
Reference in new issue
Block a user