File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -15,9 +15,6 @@ async fn async_watch(
15
15
after_build : Option < String > ,
16
16
) -> notify:: Result < ( ) > {
17
17
loop {
18
- // We want to sleep for a little while so the CPU can schedule other work. That way we end
19
- // up not burning CPU cycles.
20
- Delay :: new ( Duration :: from_millis ( 50 ) ) . await ;
21
18
let mut events: Vec < Event > = vec ! [ ] ;
22
19
while !q. is_empty ( ) {
23
20
match q. pop ( ) {
@@ -56,7 +53,7 @@ async fn async_watch(
56
53
57
54
if needs_compile {
58
55
// Wait for events to settle
59
- Delay :: new ( Duration :: from_millis ( 300 ) ) . await ;
56
+ Delay :: new ( Duration :: from_millis ( 50 ) ) . await ;
60
57
61
58
// Flush any remaining events that came in before
62
59
while !q. is_empty ( ) {
@@ -66,6 +63,9 @@ async fn async_watch(
66
63
let _ = build:: build ( filter, path, false ) ;
67
64
after_build. clone ( ) . map ( |command| cmd:: run ( command) ) ;
68
65
}
66
+ // We want to sleep for a little while so the CPU can schedule other work. That way we end
67
+ // up not burning CPU cycles.
68
+ Delay :: new ( Duration :: from_millis ( 50 ) ) . await ;
69
69
}
70
70
}
71
71
You can’t perform that action at this time.
0 commit comments