Skip to content

refactor: enhance README.md with knowledge consolidation section and clarify memory order explanations#12

Merged
soltanoff merged 1 commit into
masterfrom
feat/docs
Mar 7, 2026
Merged

refactor: enhance README.md with knowledge consolidation section and clarify memory order explanations#12
soltanoff merged 1 commit into
masterfrom
feat/docs

Conversation

@soltanoff

Copy link
Copy Markdown
Owner

This pull request introduces a new section to the documentation aimed at consolidating knowledge about memory models and lock-free data structures. It adds detailed explanations and rationale for the memory ordering choices in the SpinLock and SPSCRingBuffer implementations, replacing previous TODOs with comprehensive documentation. The most important changes are grouped by theme below.

Documentation improvements and knowledge consolidation

  • Added a new "Закрепление знаний" section to the main README.md, linking to detailed explanations for SpinLock, Single-Producer-Single-Consumer Ring Buffer, and its V2 variant, and providing guidance on how to approach the material. [1] [2]

Detailed rationale for memory ordering and implementation

  • Added a comprehensive README.md for src/spinlock, explaining the TA-TAS spinlock implementation, the rationale for using Test-And-TAS instead of TAS, and detailed justification for memory order choices.
  • Added a detailed README.md for src/spscringbuffer, covering the SPSC ring buffer structure, memory ordering rationale, and happens-before chains, with clear explanations for each operation and memory order.

Code comments and cleanup

  • Removed outdated TODO comments in src/spinlock/mod.rs, as the rationale and message passing scheme are now fully documented in the new README.md.

@soltanoff soltanoff self-assigned this Mar 7, 2026
@soltanoff soltanoff added the documentation Improvements or additions to documentation label Mar 7, 2026
@soltanoff soltanoff merged commit 08294ce into master Mar 7, 2026
6 checks passed
@soltanoff soltanoff deleted the feat/docs branch March 7, 2026 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant