forked from rojo-rbx/rojo
Fix #21: High CPU usage in a small project
This commit is contained in:
@@ -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!");
|
||||
|
||||
@@ -92,6 +92,8 @@ impl VfsWatcher {
|
||||
}
|
||||
}
|
||||
|
||||
loop {}
|
||||
loop {
|
||||
thread::sleep(Duration::from_secs(1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user