pub trait CommandCollector {
// Required method
fn invoke(
&mut self,
cmd: &str,
components_to_stop: Arc<AtomicUsize>,
) -> (SkimItemReceiver, Sender<i32>, Option<JoinHandle<()>>);
}Required Methods§
Sourcefn invoke(
&mut self,
cmd: &str,
components_to_stop: Arc<AtomicUsize>,
) -> (SkimItemReceiver, Sender<i32>, Option<JoinHandle<()>>)
fn invoke( &mut self, cmd: &str, components_to_stop: Arc<AtomicUsize>, ) -> (SkimItemReceiver, Sender<i32>, Option<JoinHandle<()>>)
execute the cmd and produce a
- skim item producer
- a channel sender, any message send would mean to terminate the
cmdprocess (for now).
Internally, the command collector may start several threads(components), the collector
should add 1 on every thread creation and sub 1 on thread termination. reader would use
this information to determine whether the collector had stopped or not.