[PR #3136] [MERGED] FutureExt::now_or_never() -> JoinSet::try_join_next() #3587

Closed
opened 2026-03-16 11:51:48 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/3136
Author: @cpu
Created: 7/18/2025
Status: Merged
Merged: 7/21/2025
Merged by: @djc

Base: mainHead: cpu-futureext-tidy_dev


📝 Commits (1)

  • 16346d3 FutureExt::now_or_never() -> JoinSet::try_join_next()

📊 Changes

2 files changed (+3 additions, -10 deletions)

View changed files

📝 crates/proto/src/runtime.rs (+1 -5)
📝 crates/server/src/server/mod.rs (+2 -5)

📄 Description

I've been spending a bit of time trying to understand more of the network socket flow and was looking at FutureExt::now_or_never() in the task reaping code. The mechanics make me think there's a simpler way to achieve the same thing with JoinSet::try_join_next() (... unless I'm overlooking something, in which case, happy to be corrected/learn something new!)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hickory-dns/hickory-dns/pull/3136 **Author:** [@cpu](https://github.com/cpu) **Created:** 7/18/2025 **Status:** ✅ Merged **Merged:** 7/21/2025 **Merged by:** [@djc](https://github.com/djc) **Base:** `main` ← **Head:** `cpu-futureext-tidy_dev` --- ### 📝 Commits (1) - [`16346d3`](https://github.com/hickory-dns/hickory-dns/commit/16346d3af71e43a654d4baa1a0cc8b86bf85ad1e) FutureExt::now_or_never() -> JoinSet::try_join_next() ### 📊 Changes **2 files changed** (+3 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `crates/proto/src/runtime.rs` (+1 -5) 📝 `crates/server/src/server/mod.rs` (+2 -5) </details> ### 📄 Description I've been spending a bit of time trying to understand more of the network socket flow and was looking at [`FutureExt::now_or_never()`](https://docs.rs/futures/latest/futures/future/trait.FutureExt.html#method.now_or_never) in the task reaping code. The mechanics make me think there's a simpler way to achieve the same thing with [`JoinSet::try_join_next()`](https://docs.rs/tokio/latest/tokio/task/struct.JoinSet.html#method.try_join_next) (_... unless I'm overlooking something, in which case, happy to be corrected/learn something new!_) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 11:51:48 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#3587
No description provided.