Changeset - 5babd5401b1e
[Not reviewed]
0 3 2
MH - 3 years ago 2022-03-22 07:03:00
contact@maxhenger.nl
Moved around definitions, started on component trait
5 files changed with 19 insertions and 8 deletions:
0 comments (0 inline, 0 general)
src/runtime2/component/component.rs
Show inline comments
 
new file 100644
 
use crate::runtime2::*;
 
use super::CompCtx;
 

	
 
pub enum CompScheduling {
 
    Immediate,
 
    Requeue,
 
    Sleep,
 
    Exit,
 
}
 

	
 
pub(crate) trait Component {
 
    fn handle_message(sched_ctx: &mut SchedulerCtx, comp_ctx: &mut CompCtx, message: Message);
 
    fn run(sched_ctx: &mut SchedulerCtx, comp_ctx: &mut CompCtx) -> CompScheduling;
 
}
 
\ No newline at end of file
src/runtime2/component/component_ip.rs
Show inline comments
 
new file 100644
src/runtime2/component/component_pdl.rs
Show inline comments
 
@@ -10,17 +10,11 @@ use crate::protocol::eval::{
 
use crate::runtime2::scheduler::SchedulerCtx;
 
use crate::runtime2::communication::*;
 

	
 
use super::component::CompScheduling;
 
use super::component_context::*;
 
use super::control_layer::*;
 
use super::consensus::Consensus;
 

	
 
pub enum CompScheduling {
 
    Immediate,
 
    Requeue,
 
    Sleep,
 
    Exit,
 
}
 

	
 
pub enum ExecStmt {
 
    CreatedChannel((Value, Value)),
 
    PerformedPut,
src/runtime2/component/mod.rs
Show inline comments
 
@@ -2,6 +2,7 @@ mod component_pdl;
 
mod component_context;
 
mod control_layer;
 
mod consensus;
 
mod component;
 

	
 
pub(crate) use component_pdl::{CompPDL, CompScheduling};
 
pub(crate) use component_context::CompCtx;
src/runtime2/mod.rs
Show inline comments
 
@@ -5,4 +5,6 @@ mod communication;
 
mod scheduler;
 
#[cfg(test)] mod tests;
 

	
 
pub use runtime::Runtime;
 
\ No newline at end of file
 
pub use runtime::Runtime;
 
pub(crate) use scheduler::SchedulerCtx;
 
pub(crate) use communication::Message;
 
\ No newline at end of file
0 comments (0 inline, 0 general)