Expand description
Stale detection for extension contexts.
When a session switches, forks, or reloads, all extension contexts from the previous session become stale. The guard uses an atomic generation counter to detect this efficiently.
Structs§
- Context
Guard - Guard that checks whether its context is still valid.
- Invalidation
Token - Shared generation counter for invalidation.
Create one per session. When the session changes,
call
invalidate()to bump the generation.