diff options
author | Clement Tsang <34804052+ClementTsang@users.noreply.github.com> | 2022-11-13 01:59:45 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-13 01:59:45 -0500 |
commit | 17ca30c02300d6ceca04a4c0501a5b120ec7880d (patch) | |
tree | 1c1272180e1b95710f57317b5bd483692b98faf5 /src | |
parent | 5f29758e4c0d8340ca516d9f583f331cd9d997d1 (diff) |
other: remove flume (#893)
In hindsight, pulling in flume is probably overkill and doesn't really
help much.
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/main.rs | 6 | ||||
-rw-r--r-- | src/lib.rs | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/bin/main.rs b/src/bin/main.rs index 2130ecb3..ae6cce84 100644 --- a/src/bin/main.rs +++ b/src/bin/main.rs @@ -10,7 +10,7 @@ use std::{ panic, sync::{ atomic::{AtomicBool, Ordering}, - Arc, Condvar, Mutex, + mpsc, Arc, Condvar, Mutex, }, thread, time::Duration, @@ -77,7 +77,7 @@ fn main() -> Result<()> { let thread_termination_cvar = Arc::new(Condvar::new()); // Set up input handling - let (sender, receiver) = flume::unbounded(); + let (sender, receiver) = mpsc::channel(); let _input_thread = create_input_thread(sender.clone(), thread_termination_lock.clone()); // Cleaning loop @@ -106,7 +106,7 @@ fn main() -> Result<()> { }; // Event loop - let (collection_thread_ctrl_sender, collection_thread_ctrl_receiver) = flume::unbounded(); + let (collection_thread_ctrl_sender, collection_thread_ctrl_receiver) = mpsc::channel(); let _collection_thread = create_collection_thread( sender, collection_thread_ctrl_receiver, @@ -20,7 +20,10 @@ use std::{ panic::PanicInfo, path::PathBuf, sync::Mutex, - sync::{Arc, Condvar}, + sync::{ + mpsc::{Receiver, Sender}, + Arc, Condvar, + }, thread::{self, JoinHandle}, time::{Duration, Instant}, }; @@ -42,7 +45,6 @@ use crossterm::{ terminal::{disable_raw_mode, LeaveAlternateScreen}, }; use data_conversion::*; -use flume::{Receiver, Sender}; use options::*; use utils::error; |