Files @ 8622657b70f9
Branch filter:

Location: CSY/reowolf/src/runtime2/communication.rs - annotation

8622657b70f9 585 B application/rls-services+xml Show Source Show as Raw Download as Raw
MH
Add ctor/dtor tests to MPSC queue

Now also testing that resources are properly moved and/or bitwise
copied inside of the MPSC queue. To make this possible the Resource
testing struct was moved outside of the store::component::tests
module.
use super::runtime::*;

#[derive(Copy, Clone)]
pub struct PortId(pub u32);

impl PortId {
    pub fn new_invalid() -> Self {
        return Self(u32::MAX);
    }
}

pub struct Peer {
    pub id: CompId,
    pub(crate) handle: CompHandle,
}

pub enum PortKind {
    Putter,
    Getter,
}

pub enum PortState {
    Open,
    Closed,
}

pub struct Port {
    pub self_id: PortId,
    pub peer_id: PortId,
    pub kind: PortKind,
    pub state: PortState,
    pub local_peer_index: u32,
}

/// Public inbox: accessible by all threads. Essentially a MPSC channel
pub struct InboxPublic {

}