Skip to content

Commit 2e340ff

Browse files
authoredDec 18, 2017
Merge pull request #22 from Quenty/fix-21-high-cpu
Fix #21: High CPU usage in a small project
2 parents b4e31ea + 5a20646 commit 2e340ff

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed
 

‎src/bin.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,9 @@ fn main() {
193193

194194
println!("Server listening on port {}", port);
195195

196-
loop {}
196+
loop {
197+
thread::park();
198+
}
197199
},
198200
("pack", _) => {
199201
eprintln!("'rojo pack' is not yet implemented!");

‎src/vfs_watch.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ impl VfsWatcher {
9292
}
9393
}
9494

95-
loop {}
95+
loop {
96+
thread::park();
97+
}
9698
}
9799
}

0 commit comments

Comments
 (0)
Please sign in to comment.