use std::thread;
pub(crate) struct Worker {
id: usize,
thread: Option<thread::JoinHandle<()>>,
is_core: bool,
}
impl Worker {
pub fn new(id: usize, thread: Option<thread::JoinHandle<()>>, is_core: bool) -> Self {
Self {
id,
thread,
is_core,
}
}
pub fn id(&self) -> usize {
self.id
}
pub fn is_core(&self) -> bool {
self.is_core
}
}