Skip to content

Add ChapterMutThin for parallel chapter access#3086

Open
SichangHe wants to merge 1 commit intorust-lang:masterfrom
SichangHe:chapter-mut-thin
Open

Add ChapterMutThin for parallel chapter access#3086
SichangHe wants to merge 1 commit intorust-lang:masterfrom
SichangHe:chapter-mut-thin

Conversation

@SichangHe
Copy link
Copy Markdown

Book only allows sequential mutable traversal today, and lacks a way for the much more efficient parallel mutation that would speed up many preprocessed by #cores×.

This simple change adds ChapterMutThin and Book::chapters_mut_thin() to return per-chapter mutable views for parallel access.

I've been using this change from my fork mdbook_fork4ls for months, within mdbook-katex and mdbook-header-footer, together w/ Rayon, and haven't had any issues. I think it's a generally useful quality-of-life addition.

@rustbot rustbot added the S-waiting-on-review Status: waiting on a review label May 3, 2026
@SichangHe SichangHe force-pushed the chapter-mut-thin branch from d7766c4 to bd8e01e Compare May 3, 2026 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: waiting on a review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants