pub fn active2_mut(&mut self, other: Id) -> (&mut Thread, &mut Thread) {
        let active = self.active.unwrap();
        let other = other.id;

        if other >= active {
            let (l, r) = self.threads.split_at_mut(other);

            (&mut l[active], &mut r[0])
        } else {
            let (l, r) = self.threads.split_at_mut(active);

            (&mut r[0], &mut l[other])
        }
    }
/// Get the active thread and second thread
Get the active thread and second thread
Get the active thread and second thread
pub fn active2_mut(&mut self, other: Id) -> (&mut Thread, &mut Thread) {
        let active = self.active.unwrap();
        let other = other.id;
        if other >= active {
            let (l, r) = self.threads.split_at_mut(other);
            (&mut l[active], &mut r[0])
        } else {
            let (l, r) = self.threads.split_at_mut(active);
            (&mut r[0], &mut l[other])
        }
    }
pub fn active2_mut ( & mut self , other : Id ) -> ( & mut Thread , & mut Thread ) { let active = self . active . unwrap ( ) ; let other = other . id ; if other >= active { let ( l , r ) = self . threads . split_at_mut ( other ) ; ( & mut l [ active ] , & mut r [ 0 ] ) } else { let ( l , r ) = self . threads . split_at_mut ( active ) ; ( & mut r [ 0 ] , & mut l [ other ] ) } }
Get the active thread and second thread
Get the active thread and second thread
&mut self
other
Id
&mut self
other
Id