refactor: use spawn_os_thread for better tokio integration (#21788)

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
This commit is contained in:
Elaela Solis
2026-02-04 16:00:37 -03:00
committed by GitHub
parent 20d94027eb
commit 386b774ed5
5 changed files with 12 additions and 4 deletions

View File

@@ -276,7 +276,7 @@ impl<N: NodePrimitives> StaticFileProvider<N> {
/// receive `update_index` notifications from a node that appends/truncates data.
pub fn watch_directory(&self) {
let provider = self.clone();
std::thread::spawn(move || {
reth_tasks::spawn_os_thread("sf-watch", move || {
let (tx, rx) = std::sync::mpsc::channel();
let mut watcher = RecommendedWatcher::new(
move |res| tx.send(res).unwrap(),