pub struct BrSel<'a, const N: XwSz, const M: XwSz>where
    [XwBmp; { _ }]: Sized,{
    pub br: &'a Br<N>,
    pub sel: &'a Sel<M>,
    pub pos: XwSq,
}Expand description
Fields§
§br: &'a Br<N>线程栅栏
sel: &'a Sel<M>信号选择器
pos: XwSq位置
Implementations§
source§impl<'a, const N: XwSz, const M: XwSz> BrSel<'a, N, M>where
    [XwBmp; { _ }]: Sized,
 
impl<'a, const N: XwSz, const M: XwSz> BrSel<'a, N, M>where
    [XwBmp; { _ }]: Sized,
sourcepub fn selected(&self, trg: &Bmp<M>) -> bool
 
pub fn selected(&self, trg: &Bmp<M>) -> bool
判断触发的 选择信号 是否包括此线程栅栏
§示例
    let msk = Bmp::<8>::new(); // 8位位图
    msk.s1all(); // 掩码为0xFF
    loop {
        let res = sel.select(&msk);
        match res {
            Ok(t) => { // 信号选择器上有 **选择信号** , `t` 为 **选择信号** 的位图。
                if br0sel.selected(&t) { // 线程栅栏被选择到
                }
            },
            Err(e) => { // 等待信号选择器失败,`e` 为 `SelError`
                break;
            },
        }
    }