Repository navigation
Conversation
`spawn_signal_forwarder` was running a `pending()` + `sleep(25ms)` ticker, mirroring the `Cmd::stream` polling loop just removed in #2537. Replace with the same shape: the listener thread blocks on `Signals::forever()`, and `SignalForwarder::stop()` closes the signal-hook handle to unblock it before joining. Drops the `Arc<AtomicBool>` stop flag — the handle now serves both shutdown signaling and signal delivery. Two-press SIGKILL semantics (impatient escalation on the second SIGINT) are preserved via the local `seen_once` flag. Latency under Ctrl-C improves from "up to 25 ms after the press" to "as soon as signal-hook delivers the signal" — most useful for the second SIGINT in the kill-all path. The existing test_alias_concurrent_second_sigint_kills test still completes within its 3 s budget. Co-Authored-By: Claude <noreply@anthropic.com>
worktrunk-bot
approved these changes
May 3, 2026
worktrunk-bot
approved these changes
May 3, 2026
Merged
max-sixty
added a commit
that referenced
this pull request
May 3, 2026
Cuts v0.47.0. Highlights: - **Integration detection fix** across `wt list`, `wt remove`, `wt merge`, `wt step prune` for the local/upstream-diverged case (#2507, #2513, #2515). - **Faster shell-command dispatch** (~10ms per invocation, 1.49× on trivial aliases) via event-driven signal forwarding (#2537, #2538), plus parallel config load (#2543) and merged cold-start prewarm rev-parse (#2541). - **`wt switch <number>` suggests `pr:N` / `mr:N`** instead of just `--create` (#2516). - **Library API breaking changes**: `RefSnapshot` cutover (#2528, #2530) and the `for-each` direct-exec change (#2465). Full list in `CHANGELOG.md`. See `CHANGELOG.md` for the complete entry. > _This was written by Claude Code on behalf of @max-sixty_ --------- Co-authored-by: Claude <noreply@anthropic.com>
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.
Follow-up to #2537.
output/concurrent.rs::spawn_signal_forwarderwas running the same kind ofpending()+ 25 ms sleep ticker that #2537 removed fromCmd::stream. Replace it with the same event-driven shape: the listener thread blocks onSignals::forever(), andSignalForwarder::stop()closes the signal-hook handle to unblock it before joining.Drops the
Arc<AtomicBool>stop flag — the signal-hook handle now serves both shutdown signaling and signal delivery. Two-press SIGKILL semantics (impatient escalation on the second SIGINT) are preserved via the localseen_onceflag in the listener.Latency under Ctrl-C improves from "up to 25 ms after the press" to "as soon as signal-hook delivers the signal" — most useful for the second SIGINT in the kill-all path.
test_alias_concurrent_second_sigint_killsstill completes within its 3 s budget.