summaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
authorClement Tsang <34804052+ClementTsang@users.noreply.github.com>2020-10-01 01:46:09 -0400
committerGitHub <noreply@github.com>2020-10-01 01:46:09 -0400
commita5b95ae8b26c720892cfe2dfbe3b52a6f6eaf546 (patch)
tree73fb7740b099ab0b1ca656f6fe48abb7658f91e1 /src/lib.rs
parent5b33e8d6b4b28c6a64e017bc137bd4897cf9cb74 (diff)
bug: use cmdline for Linux proc name if >=15 chars (#261)
This was the cause of some process names getting cut off and looking weird for Linux (and Linux only, I'm not directly responsible for the other OSes). This also adds spaces in between command line flags. Before, they were usually separated by either spaces (which looked fine) or null terminators (which meant it looked like something was broken).
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 7388fe83..605b79b7 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -615,17 +615,23 @@ pub fn create_collection_thread(
thread::spawn(move || {
trace!("Spawned collection thread.");
let mut data_state = data_harvester::DataCollector::default();
+ trace!("Created initial data state.");
data_state.set_collected_data(used_widget_set);
+ trace!("Set collected data.");
data_state.set_temperature_type(temp_type);
+ trace!("Set initial temp type.");
data_state.set_use_current_cpu_total(use_current_cpu_total);
+ trace!("Set current CPU total.");
data_state.set_show_average_cpu(show_average_cpu);
+ trace!("Set showing average CPU.");
data_state.init();
+ trace!("Data state is now fully initialized.");
loop {
trace!("Collecting...");
let mut update_time = update_rate_in_milliseconds;
if let Ok(message) = reset_receiver.try_recv() {
- trace!("Received message: {:?}", message);
+ trace!("Received message in collection thread: {:?}", message);
match message {
CollectionThreadEvent::Reset => {
data_state.data.cleanup();
@@ -650,6 +656,7 @@ pub fn create_collection_thread(
trace!("Collection thread done updating. Sending data now...");
data_state.data = data_harvester::Data::default();
if sender.send(event).is_err() {
+ trace!("Error sending from collection thread...");
break;
}
trace!("No problem sending from collection thread!");