From edf97e204d4d7241ad7950f345f6319529f7f1f4 Mon Sep 17 00:00:00 2001 From: trivernis Date: Fri, 6 Mar 2020 20:32:54 +0100 Subject: [PATCH] Revert to channels without a limit to speed up calculations again --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 3e9f85f..ec7601f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -13,7 +13,7 @@ use spinners::{Spinner, Spinners}; use std::fs; use std::fs::File; use std::io::{BufWriter, Write}; -use std::sync::mpsc::sync_channel; +use std::sync::mpsc::channel; use std::thread; use std::time::Duration; use structopt::StructOpt; @@ -185,7 +185,7 @@ fn create_dictionary(_opts: &Opts, args: &CreateDictionary) { pb = ProgressBar::new(lines.clone().count() as u64); } pb.set_max_refresh_rate(Some(Duration::from_millis(200))); - let (rx, tx) = sync_channel::(10_000_000); + let (rx, tx) = channel::(); handle = thread::spawn(move || { for line in tx { writer.write(&line.as_bytes()).unwrap();