mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-23 22:25:26 +00:00
imfs: move debugging messages outside of converter thread
This commit is contained in:
@@ -58,7 +58,9 @@ impl RealFetcher {
|
|||||||
let handle = jod_thread::Builder::new()
|
let handle = jod_thread::Builder::new()
|
||||||
.name("notify message converter".to_owned())
|
.name("notify message converter".to_owned())
|
||||||
.spawn(move || {
|
.spawn(move || {
|
||||||
|
log::trace!("RealFetcher converter thread started");
|
||||||
converter_thread(notify_receiver, sender);
|
converter_thread(notify_receiver, sender);
|
||||||
|
log::trace!("RealFetcher converter thread stopped");
|
||||||
})
|
})
|
||||||
.expect("Could not start message converter thread");
|
.expect("Could not start message converter thread");
|
||||||
|
|
||||||
@@ -83,8 +85,10 @@ impl RealFetcher {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn converter_thread(notify_receiver: mpsc::Receiver<DebouncedEvent>, sender: Sender<ImfsEvent>) {
|
fn converter_thread(notify_receiver: mpsc::Receiver<DebouncedEvent>, sender: Sender<ImfsEvent>) {
|
||||||
notify_receiver.into_iter().for_each(|event| {
|
use DebouncedEvent::*;
|
||||||
use DebouncedEvent::*;
|
|
||||||
|
for event in notify_receiver {
|
||||||
|
log::trace!("Notify event: {:?}", event);
|
||||||
|
|
||||||
match event {
|
match event {
|
||||||
Create(path) => sender.send(ImfsEvent::Created(path)).unwrap(),
|
Create(path) => sender.send(ImfsEvent::Created(path)).unwrap(),
|
||||||
@@ -114,7 +118,7 @@ fn converter_thread(notify_receiver: mpsc::Receiver<DebouncedEvent>, sender: Sen
|
|||||||
}
|
}
|
||||||
NoticeWrite(_) | NoticeRemove(_) | Chmod(_) => {}
|
NoticeWrite(_) | NoticeRemove(_) | Chmod(_) => {}
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ImfsFetcher for RealFetcher {
|
impl ImfsFetcher for RealFetcher {
|
||||||
|
|||||||
Reference in New Issue
Block a user