rename reader_task
This commit is contained in:
parent
f275069f23
commit
dbf9e8cdac
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user