Daemonize the musicbrainz thread #217

Merged
wojtek merged 15 commits from 188---add-option-for-manual-input-during-fetch into main 2024-09-21 23:03:47 +02:00
Showing only changes of commit 9b4b8763be - Show all commits

View File

@ -9,11 +9,6 @@ use crate::tui::{
}, },
}; };
enum JobError {
JobQueueEmpty,
EventChannelDisconnected,
}
pub struct MusicBrainzDaemon { pub struct MusicBrainzDaemon {
musicbrainz: Box<dyn IMusicBrainz>, musicbrainz: Box<dyn IMusicBrainz>,
job_receiver: mpsc::Receiver<Job>, job_receiver: mpsc::Receiver<Job>,
@ -66,6 +61,11 @@ impl JobInstance {
} }
} }
enum JobError {
JobQueueEmpty,
EventChannelDisconnected,
}
pub struct JobChannel { pub struct JobChannel {
sender: mpsc::Sender<Job>, sender: mpsc::Sender<Job>,
receiver: mpsc::Receiver<Job>, receiver: mpsc::Receiver<Job>,