Fix #21: High CPU usage in a small project

This commit is contained in:
James Onnen
2017-12-17 14:20:24 -06:00
parent b4e31ea35d
commit ae6ca6fb23
2 changed files with 7 additions and 2 deletions

View File

@@ -22,6 +22,7 @@ pub mod vfs_watch;
use std::path::{Path, PathBuf};
use std::sync::{Arc, Mutex};
use std::thread;
use std::time::Duration;
use core::Config;
use pathext::canonicalish;
@@ -193,7 +194,9 @@ fn main() {
println!("Server listening on port {}", port);
loop {}
loop {
thread::sleep(Duration::from_secs(1));
}
},
("pack", _) => {
eprintln!("'rojo pack' is not yet implemented!");

View File

@@ -92,6 +92,8 @@ impl VfsWatcher {
}
}
loop {}
loop {
thread::sleep(Duration::from_secs(1));
}
}
}