pub fn build(&self) -> BuildProgressStream<'_> {
        let progression = SharedBuildProgress::new(BuildProgress {
            workers: (0..self.num_threads.get())
                .map(|_| BuildWorkerProgress {
                    task_name: Arc::from(String::new()),
                    processed_bytes: 0,
                    process_bytes: 0,
                })
                .collect(),
            stage: BuildStage::BuildingOperations,
            processed_bytes: 0,
            process_bytes: 0,
        });
        let mut txs = Vec::new();
        let mut rxs = Vec::new();
        for thread_idx in 0..self.num_threads.get() {
            let (tx, rx) = watch_progress::channel::<(u64, BuildWorkerProgress)>();
            txs.push(tx);
            let progression = progression.clone();
            rxs.push(rx.map(move |(delta, progress)| {
                let mut p = progression.borrow_mut();
                p.processed_bytes += delta;
                p.workers[thread_idx] = progress;
                drop(p);
                Ok(progression.clone())
            }));
        }

        let rx_stream = stream::select_all(rxs);
        let w_stream = self.execute(txs).map(|_| stream::empty()).flatten_stream();

        stream::select(rx_stream, w_stream).boxed_local()
    }
/// Starts building packages and returns a progression stream
///
/// To cancel the building process, stop polling the stream
Starts building packages and returns a progression stream
To cancel the building process, stop polling the stream
Starts building packages and returns a progression stream To cancel the building process stop polling the stream
pub fn build(&self) -> BuildProgressStream<'_> {
        let progression = SharedBuildProgress::new(BuildProgress {
            workers: (0..self.num_threads.get())
                .map(|_| BuildWorkerProgress {
                    task_name: Arc::from(String::new()),
                    processed_bytes: 0,
                    process_bytes: 0,
                })
                .collect(),
            stage: BuildStage::BuildingOperations,
            processed_bytes: 0,
            process_bytes: 0,
        });
        let mut txs = Vec::new();
        let mut rxs = Vec::new();
        for thread_idx in 0..self.num_threads.get() {
            let (tx, rx) = watch_progress::channel::<(u64, BuildWorkerProgress)>();
            txs.push(tx);
            let progression = progression.clone();
            rxs.push(rx.map(move |(delta, progress)| {
                let mut p = progression.borrow_mut();
                p.processed_bytes += delta;
                p.workers[thread_idx] = progress;
                drop(p);
                Ok(progression.clone())
            }));
        }
        let rx_stream = stream::select_all(rxs);
        let w_stream = self.execute(txs).map(|_| stream::empty()).flatten_stream();
        stream::select(rx_stream, w_stream).boxed_local()
    }
pub fn build ( & self ) -> BuildProgressStream < ' _ > { let progression = SharedBuildProgress :: new ( BuildProgress { workers : ( 0 .. self . num_threads . get ( ) ) . map ( | _ | BuildWorkerProgress { task_name : Arc :: from ( String :: new ( ) ) , processed_bytes : 0 , process_bytes : 0 , } ) . collect ( ) , stage : BuildStage :: BuildingOperations , processed_bytes : 0 , process_bytes : 0 , } ) ; let mut txs = Vec :: new ( ) ; let mut rxs = Vec :: new ( ) ; for thread_idx in 0 .. self . num_threads . get ( ) { let ( tx , rx ) = watch_progress :: channel :: < ( u64 , BuildWorkerProgress ) > ( ) ; txs . push ( tx ) ; let progression = progression . clone ( ) ; rxs . push ( rx . map ( move | ( delta , progress ) | { let mut p = progression . borrow_mut ( ) ; p . processed_bytes += delta ; p . workers [ thread_idx ] = progress ; drop ( p ) ; Ok ( progression . clone ( ) ) } ) ) ; } let rx_stream = stream :: select_all ( rxs ) ; let w_stream = self . execute ( txs ) . map ( | _ | stream :: empty ( ) ) . flatten_stream ( ) ; stream :: select ( rx_stream , w_stream ) . boxed_local ( ) }
Starts building packages and returns a progression stream
To cancel the building process, stop polling the stream
Starts building packages and returns a progression stream To cancel the building process stop polling the stream
&self
&self