This release improves STMSharp correctness and stability under contention and moves the library to .NET 10.
✅ Highlights
-
.NET 10 upgrade
- Updated the project to target .NET 10.
-
Protocol correctness (even/odd reservation scheme)
- Fixed
STMVariable<T>.Write(...)to be protocol-compatible: it reserves the variable (even → odd), publishes the value, and releases it (odd → even). - Updated
IncrementVersion()to preserve parity and never leave the variable in a reserved/odd state.
- Fixed
-
Improved progress under contention
- Deterministic write-set reservation ordering now uses a per-variable unique id (stable total order), reducing livelock risk in high-contention scenarios.
-
Robust variable tracking
- Transaction dictionaries now track variables by reference identity via
ReferenceEqualityComparer, avoiding issues with customEquals/GetHashCode.
- Transaction dictionaries now track variables by reference identity via
-
Tests & documentation
- Added guardrail tests for direct writes and version parity invariants.
- Updated README to reflect protocol guarantees, deterministic ordering, and current API surface (
ITransaction,StmOptions,StmDiagnostics).
Notes
Direct STMVariable<T>.Write(...) remains available and is now protocol-compatible, but transactional commits are still the recommended approach for composing concurrent operations safely.