Skip to content

refactor(concurrent): split the download loop into per-event modules - #133

Merged
greenhat616 merged 1 commit into
perf/event-loop-01-testsfrom
perf/event-loop-02-split
Oct 21, 2026
Merged

greenhat616 merged 1 commit into
perf/event-loop-01-testsfrom
perf/event-loop-02-split

Conversation

@greenhat616

Copy link
Copy Markdown
Owner

Part 2/13 of the event-loop optimization stack · Pure move. Stacked on part 1.

Moves DownloadLoop, RunnerSpawner and the shared test fixtures out of concurrent_task/mod.rs into download_loop.rs, download_loop/{completion,deadline,runner,strategy_tick,throughput,tests}.rs, runner_spawner.rs and test_support.rs.

Function bodies are unchanged; only imports, mod declarations and the pub(super) needed across sibling modules differ. Review with git show --color-moved=zebra --color-moved-ws=allow-indentation-change.

The tests from part 1 move with the code and still pass.

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.
@greenhat616
greenhat616 added this pull request to stack #145 October 16, 2026 02:38
@greenhat616
greenhat616 marked this pull request as ready for review October 21, 2026 05:23
@greenhat616
greenhat616 merged commit 92cc041 into dev Oct 21, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant