Fix race conditions when accessing variables

This commit is contained in:
WarmUpTill
2026-03-23 19:51:32 +01:00
committed by WarmUpTill
parent 85460157b1
commit 4d5ffe38fc
4 changed files with 49 additions and 21 deletions

View File

@@ -40,7 +40,7 @@ TEST_CASE("Variable", "[variable]")
variable.Value(false);
REQUIRE(*variable.GetSecondsSinceLastUse() > 1);
variable.UpdateLastUsed();
variable.MarkAsUsed();
REQUIRE(*variable.GetSecondsSinceLastUse() == 0);
variable.SetValue(123);