feat(runtime): implement shared transactional memcard with async saves
Intrepid/Prometeu/Runtime/pipeline/pr-master This commit looks good
Intrepid/Prometeu/Runtime/pipeline/pr-master This commit looks good
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
//! Portable submission seam for host-owned cooperative IO execution.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum WorkStep {
|
||||
Yield,
|
||||
Complete,
|
||||
Failed,
|
||||
}
|
||||
pub type AssetWork = Box<dyn FnMut(bool) -> WorkStep + Send + 'static>;
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub struct WorkUnavailable;
|
||||
pub trait BackgroundWork: Send + Sync {
|
||||
fn submit_asset(&self, work: AssetWork) -> Result<(), WorkUnavailable>;
|
||||
}
|
||||
Reference in New Issue
Block a user