pub fn execute(&self, request: &ExecutionRequest, session: &Session) -> Vec<RootResult> {
    // Bootstrap tasks for the roots, and then wait for all of them.
    debug!("Launching {} roots.", request.roots.len());

    session.extend(&request.roots);

    // Wait for all roots to complete. Failure here should be impossible, because each
    // individual Future in the join was (eventually) mapped into success.
    let context = RootContext {
      core: self.core.clone(),
    };
    let (sender, receiver) = mpsc::channel();

    Scheduler::execute_helper(context, sender, request.roots.clone(), 8);
    let roots: Vec<NodeKey> = request
      .roots
      .clone()
      .into_iter()
      .map(NodeKey::from)
      .collect();

    // Lock the display for the remainder of the execution, and grab a reference to it.
    let mut maybe_display = match &session.display {
      &Some(ref d) => Some(d.lock()),
      &None => None,
    };

    // This map keeps the k most relevant jobs in assigned possitions.
    // Keys are positions in the display (display workers) and the values are the actual jobs to print.
    let mut tasks_to_display = IndexMap::new();

    if let Some(ref mut display) = maybe_display {
      display.start();
    };

    let results = loop {
      if let Ok(res) = receiver.recv_timeout(Duration::from_millis(100)) {
        break res;
      } else if let Some(ref mut display) = maybe_display {
        Scheduler::display_ongoing_tasks(&self.core.graph, &roots, display, &mut tasks_to_display);
      }
    };
    if let Some(ref mut display) = maybe_display {
      display.finish();
    };

    results
  }
///
/// Compute the results for roots in the given request.
///
Compute the results for roots in the given request.
Compute the results for roots in the given request .
pub fn execute(&self, request: &ExecutionRequest, session: &Session) -> Vec<RootResult> {
    // Bootstrap tasks for the roots, and then wait for all of them.
    debug!("Launching {} roots.", request.roots.len());
    session.extend(&request.roots);
    // Wait for all roots to complete. Failure here should be impossible, because each
    // individual Future in the join was (eventually) mapped into success.
    let context = RootContext {
      core: self.core.clone(),
    };
    let (sender, receiver) = mpsc::channel();
    Scheduler::execute_helper(context, sender, request.roots.clone(), 8);
    let roots: Vec<NodeKey> = request
      .roots
      .clone()
      .into_iter()
      .map(NodeKey::from)
      .collect();
    // Lock the display for the remainder of the execution, and grab a reference to it.
    let mut maybe_display = match &session.display {
      &Some(ref d) => Some(d.lock()),
      &None => None,
    };
    // This map keeps the k most relevant jobs in assigned possitions.
    // Keys are positions in the display (display workers) and the values are the actual jobs to print.
    let mut tasks_to_display = IndexMap::new();
    if let Some(ref mut display) = maybe_display {
      display.start();
    };
    let results = loop {
      if let Ok(res) = receiver.recv_timeout(Duration::from_millis(100)) {
        break res;
      } else if let Some(ref mut display) = maybe_display {
        Scheduler::display_ongoing_tasks(&self.core.graph, &roots, display, &mut tasks_to_display);
      }
    };
    if let Some(ref mut display) = maybe_display {
      display.finish();
    };
    results
  }
pub fn execute ( & self , request : & ExecutionRequest , session : & Session ) -> Vec < RootResult > { // Bootstrap tasks for the roots, and then wait for all of them. debug ! ( " " request roots len ( ) ) ; session . extend ( & request . roots ) ; // Wait for all roots to complete. Failure here should be impossible, because each // individual Future in the join was (eventually) mapped into success. let context = RootContext { core : self . core . clone ( ) , } ; let ( sender , receiver ) = mpsc :: channel ( ) ; Scheduler :: execute_helper ( context , sender , request . roots . clone ( ) , 8 ) ; let roots : Vec < NodeKey > = request . roots . clone ( ) . into_iter ( ) . map ( NodeKey :: from ) . collect ( ) ; // Lock the display for the remainder of the execution, and grab a reference to it. let mut maybe_display = match & session . display { & Some ( ref d ) => Some ( d . lock ( ) ) , & None => None , } ; // This map keeps the k most relevant jobs in assigned possitions. // Keys are positions in the display (display workers) and the values are the actual jobs to print. let mut tasks_to_display = IndexMap :: new ( ) ; if let Some ( ref mut display ) = maybe_display { display . start ( ) ; } ; let results = loop { if let Ok ( res ) = receiver . recv_timeout ( Duration :: from_millis ( 100 ) ) { break res ; } else if let Some ( ref mut display ) = maybe_display { Scheduler :: display_ongoing_tasks ( & self . core . graph , & roots , display , & mut tasks_to_display ) ; } } ; if let Some ( ref mut display ) = maybe_display { display . finish ( ) ; } ; results }
Compute the results for roots in the given request.
Compute the results for roots in the given request .
&self
request
&ExecutionRequest
session
&Session
&self
request
&ExecutionRequest
session
&Session