[PR #3305] [CLOSED] proto: extend Spawn trait to remove hardcoded tokio::spawn calls #3727

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

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/3305
Author: @CathalMullan
Created: 10/11/2025
Status: Closed

Base: mainHead: proto-spawn


📝 Commits (1)

  • a4a385b proto: extend Spawn trait to remove hardcoded tokio::spawn calls

📊 Changes

11 files changed (+102 additions, -84 deletions)

View changed files

📝 bin/tests/integration/named_https_tests.rs (+1 -1)
📝 bin/tests/integration/named_quic_tests.rs (+1 -1)
📝 bin/tests/integration/named_rustls_tests.rs (+2 -2)
📝 bin/tests/integration/named_test_rsa_dnssec.rs (+4 -4)
📝 bin/tests/integration/named_tests.rs (+20 -20)
📝 crates/proto/src/h2/h2_client_stream.rs (+27 -25)
📝 crates/proto/src/h3/h3_client_stream.rs (+17 -8)
📝 crates/proto/src/runtime.rs (+17 -12)
📝 crates/proto/src/xfer/dns_exchange.rs (+1 -1)
📝 crates/resolver/src/name_server/connection_provider.rs (+2 -1)
📝 util/src/bin/dns.rs (+10 -9)

📄 Description

Part of #3304, aiming to make proto less tokio dependent.

Removed the uses of tokio::spawn by adding a plain spawn method to the runtime Spawn trait.

The naming might be slightly confusing now between spawn and spawn_bg. Added a comment to explain the difference in behavior, but maybe renaming spawn_bg would be the best option? Or changing spawn to spawn_detached instead?

Also removed the freestanding hickory_proto::runtime::spawn_bg method. Seemed redundant, unless I'm missing something.


🔄 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/3305 **Author:** [@CathalMullan](https://github.com/CathalMullan) **Created:** 10/11/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `proto-spawn` --- ### 📝 Commits (1) - [`a4a385b`](https://github.com/hickory-dns/hickory-dns/commit/a4a385b297d240ddd41869add69f61bc936f5886) proto: extend Spawn trait to remove hardcoded tokio::spawn calls ### 📊 Changes **11 files changed** (+102 additions, -84 deletions) <details> <summary>View changed files</summary> 📝 `bin/tests/integration/named_https_tests.rs` (+1 -1) 📝 `bin/tests/integration/named_quic_tests.rs` (+1 -1) 📝 `bin/tests/integration/named_rustls_tests.rs` (+2 -2) 📝 `bin/tests/integration/named_test_rsa_dnssec.rs` (+4 -4) 📝 `bin/tests/integration/named_tests.rs` (+20 -20) 📝 `crates/proto/src/h2/h2_client_stream.rs` (+27 -25) 📝 `crates/proto/src/h3/h3_client_stream.rs` (+17 -8) 📝 `crates/proto/src/runtime.rs` (+17 -12) 📝 `crates/proto/src/xfer/dns_exchange.rs` (+1 -1) 📝 `crates/resolver/src/name_server/connection_provider.rs` (+2 -1) 📝 `util/src/bin/dns.rs` (+10 -9) </details> ### 📄 Description Part of #3304, aiming to make `proto` less `tokio` dependent. Removed the uses of `tokio::spawn` by adding a plain `spawn` method to the runtime `Spawn` trait. The naming might be slightly confusing now between `spawn` and `spawn_bg`. Added a comment to explain the difference in behavior, but maybe renaming `spawn_bg` would be the best option? Or changing `spawn` to `spawn_detached` instead? Also removed the freestanding `hickory_proto::runtime::spawn_bg` method. Seemed redundant, unless I'm missing something. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 11:59:24 +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#3727
No description provided.