This website works better with JavaScript.
git.jstrong.dev
Home
Explore
Help
Sign In
jstrong
/
influx-writer
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
puts `thread::sleep`s behind a "no-thrash" feature
master
Jonathan Strong
7 years ago
parent
b3d364caeb
commit
5ef257a3b9
3 changed files
with
5 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+3
-0
Cargo.toml
+1
-0
src/influx.rs
+1
-0
src/latency.rs
+ 3
- 0
Cargo.toml
View File
@@ -15,3 +15,6 @@ sloggers = "0.2"
windows = { path = "../windows" }
money = { path = "../money" }
[features]
no-thrash = []
+ 1
- 0
src/influx.rs
View File
@@ -401,6 +401,7 @@ pub fn writer_str_or_meas(log_path: &str, warnings: Sender<Warning>) -> (thread:
});
if !rcvd_msg {
#[cfg(feature = "no-thrash")]
thread::sleep(Duration::from_millis(1) / 10);
}
}
+ 1
- 0
src/latency.rs
View File
@@ -400,6 +400,7 @@ impl Manager {
last.broadcast = loop_time;
debug!(logger, "sent broadcast");
} else {
#[cfg(feature = "no-thrash")]
thread::sleep(Duration::from_millis(1) / 10);
}
Write
Preview
Loading…
Cancel
Save