Repository navigation
refactor(concurrent): split the download loop into per-event modules - #133
Merged
Merged
Conversation
Phase R of the event loop optimization: a pure move, no behavior change.
- `runner_spawner.rs`: `RunnerSpawner` and its tests.
- `test_support.rs`: fixtures shared by the concurrent task tests.
- `download_loop.rs`: `DownloadLoop`, `LoopEvent`, `new`, `run`,
`next_event` (still `select_biased!`) and `finish`.
- `download_loop/{completion,deadline,runner,strategy_tick,throughput}.rs`:
one module per event source with its handler; `download_loop/tests.rs`
holds the loop tests.
Function bodies are unchanged; only imports and the `pub(super)` needed
across sibling modules were added. `mod.rs` keeps the assembly layer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 2/13 of the event-loop optimization stack · Pure move. Stacked on part 1.
Moves
DownloadLoop,RunnerSpawnerand the shared test fixtures out ofconcurrent_task/mod.rsintodownload_loop.rs,download_loop/{completion,deadline,runner,strategy_tick,throughput,tests}.rs,runner_spawner.rsandtest_support.rs.Function bodies are unchanged; only imports,
moddeclarations and thepub(super)needed across sibling modules differ. Review withgit show --color-moved=zebra --color-moved-ws=allow-indentation-change.The tests from part 1 move with the code and still pass.