fn pop_running() -> Option<RcProcess> {
    let mut run_queue = global_state().run_queue.lock();

    while let Some(process) = run_queue.pop_front() {
        if process.lock().is_running() {
            return Some(process);
        }
    }

    None
}
/// Gets the first running process from the queue, discarding non-running
/// processes.
Gets the first running process from the queue, discarding non-running
processes.
Gets the first running process from the queue discarding non - running processes .
fn pop_running() -> Option<RcProcess> {
    let mut run_queue = global_state().run_queue.lock();
    while let Some(process) = run_queue.pop_front() {
        if process.lock().is_running() {
            return Some(process);
        }
    }
    None
}
fn pop_running ( ) -> Option < RcProcess > { let mut run_queue = global_state ( ) . run_queue . lock ( ) ; while let Some ( process ) = run_queue . pop_front ( ) { if process . lock ( ) . is_running ( ) { return Some ( process ) ; } } None }
Gets the first running process from the queue, discarding non-running
processes.
Gets the first running process from the queue discarding non - running processes .