rename reader_task

This commit is contained in:
Dmitry Belyaev 2022-10-10 16:13:27 +03:00
parent f275069f23
commit dbf9e8cdac
Signed by: b4tman
GPG Key ID: 41A00BF15EA7E5F3

View File

@ -58,7 +58,7 @@ struct Cli {
measure: bool,
}
fn reader_task(tx: mpsc::Sender<Question>) {
fn zip_reader_task(tx: mpsc::Sender<Question>) {
let zip_file = fs::File::open(ZIP_FILENAME).unwrap();
let zip_reader = io::BufReader::new(zip_file);
let archive = zip::ZipArchive::new(zip_reader).unwrap();
@ -124,7 +124,7 @@ fn db_writer_task(rx: mpsc::Receiver<Question>) {
fn write_db() {
let (tx, rx) = mpsc::channel::<Question>();
[
thread::spawn(move || reader_task(tx)),
thread::spawn(move || zip_reader_task(tx)),
thread::spawn(move || db_writer_task(rx)),
]
.into_iter()
@ -258,7 +258,7 @@ fn read_from_db2(id: u32) -> Option<Question> {
fn write_db2() {
let (tx, rx) = mpsc::channel::<Question>();
[
thread::spawn(move || reader_task(tx)),
thread::spawn(move || zip_reader_task(tx)),
thread::spawn(move || db_writer2_task(rx)),
]
.into_iter()