MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / ensure_foreground_process

Function ensure_foreground_process

packages/server/src/performance.rs:553–565  ·  view source on GitHub ↗
(
    processes: &mut Vec<PerformanceProcess>,
    foreground: &ForegroundProcess,
)

Source from the content-addressed store, hash-verified

551}
552
553async fn ensure_foreground_process(
554 processes: &mut Vec<PerformanceProcess>,
555 foreground: &ForegroundProcess,
556) {
557 let pid = foreground.process_identifier as i32;
558 if processes.iter().any(|process| process.pid == pid) {
559 return;
560 }
561 let Some(ps) = ps_process_for_pid(pid).await else {
562 return;
563 };
564 processes.push(performance_process(ps, Some(foreground)));
565}
566
567fn performance_process(
568 ps: PsProcess,

Callers 2

list_processesMethod · 0.85
snapshotMethod · 0.85

Calls 2

ps_process_for_pidFunction · 0.85
performance_processFunction · 0.85

Tested by

no test coverage detected