-
Notifications
You must be signed in to change notification settings - Fork 0
Add rayon concurrency note #101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,23 @@ | ||||||||||
| # Roadmap for Parallel File Processing | ||||||||||
|
|
||||||||||
| The command-line tool currently processes input files sequentially. The steps | ||||||||||
| below outline the work required to allow concurrent processing while preserving | ||||||||||
| serial output order. | ||||||||||
|
|
||||||||||
| - [ ] **Adopt `rayon` for concurrency** | ||||||||||
| - Use `rayon` thread pools to spawn work for each file path. | ||||||||||
| - Ensure the approach integrates cleanly with existing modules. | ||||||||||
| - [ ] **Add chosen crate to `Cargo.toml`** | ||||||||||
| - Pin an explicit version and document the decision in `docs/`. | ||||||||||
| - [ ] **Refactor `main.rs` to launch parallel tasks** | ||||||||||
| - Spawn a worker for each file path using the concurrency crate. | ||||||||||
| - Maintain a list of handles so outputs can be gathered in order. | ||||||||||
| - [ ] **Collect results sequentially** | ||||||||||
| - Await or join handles in the same order the files were supplied. | ||||||||||
| - Print each processed file or error message before moving to the next. | ||||||||||
| - [ ] **Extend tests for parallel execution** | ||||||||||
| - Use `rstest` to verify that processing many files yields correct results. | ||||||||||
| - Add tests exercising error handling when some paths are invalid. | ||||||||||
| - [ ] **Update documentation** | ||||||||||
| - Document the new flags or behaviour in `README.md` and module docs. | ||||||||||
| - Note any concurrency caveats or performance implications. | ||||||||||
|
Comment on lines
+22
to
+23
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Replace “caveats” with plainer British English. “Caveats” is legalistic. Prefer “warnings” to keep the prose clear. - - Note any concurrency caveats or performance implications.
+ - Note any concurrency warnings or performance implications.📝 Committable suggestion
Suggested change
🧰 Tools🪛 LanguageTool[style] ~23-~23: The word ‘caveats’ is a legal term. To make your text as clear as possible to all readers, do not use this foreign term unless it is used with its legal meaning. Possible alternatives are “cautions” or “warnings”. (CAVEAT) 🤖 Prompt for AI Agents |
||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Insert the missing comma after “handles”.
The comma before “so” prevents the sentence from reading as a fused clause.
📝 Committable suggestion
🧰 Tools
🪛 LanguageTool
[uncategorized] ~14-~14: Use a comma before ‘so’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...cy crate. - Maintain a list of handles so outputs can be gathered in order. - [ ]...
(COMMA_COMPOUND_SENTENCE_2)
🤖 Prompt for AI Agents