[PR #593] [MERGED] Make trust_dns_server::server::ResponseHandler Send #1545

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

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/593
Author: @sticnarf
Created: 10/24/2018
Status: Merged
Merged: 10/24/2018
Merged by: @bluejekyll

Base: masterHead: make-response-handler-send


📝 Commits (1)

  • 94f7686 Make ResponseHandler Send

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 crates/server/src/server/response_handler.rs (+1 -1)

📄 Description

To build an asynchronous DNS server upon trust-dns-server, I create my own RequestHandler. In the handle_request function that I have to implement, I intend to spawn a Future which captures and uses response_handle to the Tokio runtime.

It is known that most of the spawn functions (except that of current_thread) in Tokio require the Future to be Send. However, ResponseHandler is not marked Send and this prevents the Future captures it from being spawned to the Tokio runtime.

Currently, the only implementor of ResponseHandler is ResponseHandle which is Send. So it is okay to add Send to ResponseHandler at this stage.

Of course, as I know little about your future development plan, if adding Send constraint to ResponseHandle could make some trouble, close it as you like.


🔄 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/593 **Author:** [@sticnarf](https://github.com/sticnarf) **Created:** 10/24/2018 **Status:** ✅ Merged **Merged:** 10/24/2018 **Merged by:** [@bluejekyll](https://github.com/bluejekyll) **Base:** `master` ← **Head:** `make-response-handler-send` --- ### 📝 Commits (1) - [`94f7686`](https://github.com/hickory-dns/hickory-dns/commit/94f76865ce6cffd4c0c752ad6c9b7af8847a0ae3) Make ResponseHandler Send ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/server/src/server/response_handler.rs` (+1 -1) </details> ### 📄 Description To build an asynchronous DNS server upon `trust-dns-server`, I create my own `RequestHandler`. In the `handle_request` function that I have to implement, I intend to spawn a `Future` which captures and uses `response_handle` to the Tokio runtime. It is known that most of the `spawn` functions (except that of `current_thread`) in Tokio require the `Future` to be `Send`. However, `ResponseHandler` is not marked `Send` and this prevents the `Future` captures it from being spawned to the Tokio runtime. Currently, the only implementor of `ResponseHandler` is `ResponseHandle` which is `Send`. So it is okay to add `Send` to `ResponseHandler` at this stage. Of course, as I know little about your future development plan, if adding `Send` constraint to `ResponseHandle` could make some trouble, close it as you like. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 02:12:11 +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#1545
No description provided.