[PR #480] [MERGED] resolver: Refactor Future implementation for LookupIpFuture #1468

Closed
opened 2026-03-16 02:08:07 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/480
Author: @hawkw
Created: 5/21/2018
Status: Merged
Merged: 5/22/2018
Merged by: @bluejekyll

Base: masterHead: eliza/no-unpark


📝 Commits (3)

  • 199ae2e resolver: Refactor Future implementation for LookupIpFuture
  • c4ba57f Merge branch 'master' into eliza/no-unpark
  • 017d1c0 resolver: Improve comments in LookupIpFuture

📊 Changes

4 files changed (+145 additions, -73 deletions)

View changed files

resolver/examples/multithreaded_runtime.rs (+70 -0)
📝 resolver/src/lookup_ip.rs (+72 -72)
📝 scripts/test_default_features.sh (+1 -0)
📝 scripts/test_windows.bat (+2 -1)

📄 Description

This PR refactors the implementation of Future for LookupIpFuture to
remove the need to call task::current().unpark(), and (hopefully) simplify
the implementation. Typically, I find that unparking a future manually is often
a source of confusion that makes the Future implementation harder to reason
about, and ought to be avoided when possible. Hopefully the resultant code
is simpler and easier to understand, and shouldn't change the semantics of
LookupIpFuture.

This came out of work I was doing on issue #430, but I realised it could be
factored out into a separate branch.

Signed-off-by: Eliza Weisman eliza@buoyant.io


🔄 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/480 **Author:** [@hawkw](https://github.com/hawkw) **Created:** 5/21/2018 **Status:** ✅ Merged **Merged:** 5/22/2018 **Merged by:** [@bluejekyll](https://github.com/bluejekyll) **Base:** `master` ← **Head:** `eliza/no-unpark` --- ### 📝 Commits (3) - [`199ae2e`](https://github.com/hickory-dns/hickory-dns/commit/199ae2e0347ff5a0db9341400199769b92911959) resolver: Refactor Future implementation for LookupIpFuture - [`c4ba57f`](https://github.com/hickory-dns/hickory-dns/commit/c4ba57f823d1e0252f91423a26b9ae8aa347cacd) Merge branch 'master' into eliza/no-unpark - [`017d1c0`](https://github.com/hickory-dns/hickory-dns/commit/017d1c0242895e4c44c68c1de78088c1ff05fee3) resolver: Improve comments in `LookupIpFuture` ### 📊 Changes **4 files changed** (+145 additions, -73 deletions) <details> <summary>View changed files</summary> ➕ `resolver/examples/multithreaded_runtime.rs` (+70 -0) 📝 `resolver/src/lookup_ip.rs` (+72 -72) 📝 `scripts/test_default_features.sh` (+1 -0) 📝 `scripts/test_windows.bat` (+2 -1) </details> ### 📄 Description This PR refactors the implementation of `Future` for `LookupIpFuture` to remove the need to call `task::current().unpark()`, and (hopefully) simplify the implementation. Typically, I find that unparking a future manually is often a source of confusion that makes the `Future` implementation harder to reason about, and ought to be avoided when possible. Hopefully the resultant code is simpler and easier to understand, and shouldn't change the semantics of `LookupIpFuture`. This came out of work I was doing on issue #430, but I realised it could be factored out into a separate branch. Signed-off-by: Eliza Weisman <eliza@buoyant.io> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 02:08:07 +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#1468
No description provided.