mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-30 03:01:58 -04:00
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:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user