Skip to content

Release v2.0.0

Latest

Choose a tag to compare

@engineering87 engineering87 released this 06 Jan 17:28
· 2 commits to main since this release
73fceae

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.
  • 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 custom Equals/GetHashCode.
  • 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.