refactor: replace Mutex with SemaphoreSlim
Mutex uses system mutexes and SemaphoreSlim does not.
This commit is contained in:
@@ -707,7 +707,7 @@ internal sealed class ChatLog : IUiComponent {
|
||||
}
|
||||
|
||||
try {
|
||||
tab.MessagesMutex.WaitOne();
|
||||
tab.MessagesMutex.Wait();
|
||||
|
||||
var reset = false;
|
||||
if (this._lastResize.IsRunning && this._lastResize.Elapsed.TotalSeconds > 0.25) {
|
||||
@@ -841,7 +841,7 @@ internal sealed class ChatLog : IUiComponent {
|
||||
lastPos = ImGui.GetCursorPosY();
|
||||
}
|
||||
} finally {
|
||||
tab.MessagesMutex.ReleaseMutex();
|
||||
tab.MessagesMutex.Release();
|
||||
ImGui.PopStyleVar(this.Ui.Plugin.Config.PrettierTimestamps && this.Ui.Plugin.Config.MoreCompactPretty ? 2 : 1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user