Skip to content

feat(concurrent)!: send runner limits through a latest-value mailbox - #140

Merged
greenhat616 merged 1 commit into
perf/event-loop-08-runner-pollfrom
perf/event-loop-09-limit-mailbox
Oct 21, 2026
Merged

greenhat616 merged 1 commit into
perf/event-loop-08-runner-pollfrom
perf/event-loop-09-limit-mailbox

Conversation

@greenhat616

Copy link
Copy Markdown
Owner

Part 9/13 of the event-loop optimization stack · Breaking API. Stacked on part 8.

Manager limits go through a lock-free single-slot mailbox (LimitSender/LimitReceiver) instead of a bounded channel, so any number of limits can reach a connecting runner (the root cause behind part 4).

BREAKING: TaskRunnerBuilder fields are private; RunnerManager, RunnerRegistration, ControlSender and ControlReceiver are no longer exported.

The runner manager sent each limit through a bounded channel of 8 that a
connecting runner does not read, so repeated splits could fill it. A
manager only ever lowers a runner's limit, so it now sends limits through
a lock-free single-slot mailbox: a newer limit replaces an unread one and
the runner reads only the latest. A runner built with the public
`TaskRunnerBuilder::control_signal` still applies every signal in order.

BREAKING CHANGE: `TaskRunnerBuilder` fields are private; use its setters.
`bolt_load::task::instance` no longer exports `RunnerManager`,
`RunnerRegistration`, `ControlSender` and `ControlReceiver`, which only the
concurrent task used.
@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:43
@greenhat616
greenhat616 merged commit 98045b4 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