Tests: three gates are reached by a stale guess followed by a settled cache, ordered with the store's hooks
The spec's account (guess null, then a successful attach) takes two gates, not three: the guess gate is taken only for a non-null guess. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
2181a7461f
commit
a768b821fc
2 changed files with 25 additions and 44 deletions
|
|
@ -3618,7 +3618,8 @@ namespace GameCult.Caching
|
|||
internal readonly object _storeGate = new();
|
||||
|
||||
// Gates the current thread has taken for store calls, read by tests (InternalsVisibleTo) to pin the two bounds of Gate<T>: at
|
||||
// most two under failing-attach churn (Cache read under the store's gate is then always null), at most three otherwise.
|
||||
// most two under failing-attach churn (Cache read under the store's gate is then always null), at most three otherwise: a
|
||||
// stale non-null guess (its gate), the store's gate, and the settled cache's gate.
|
||||
[ThreadStatic]
|
||||
internal static int GateTakes;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue