pub struct WasiProcessInner {
pub pid: WasiProcessId,
pub threads: HashMap<WasiThreadId, WasiThread>,
pub thread_count: u32,
pub signal_intervals: HashMap<Signal, WasiSignalInterval>,
pub children: Vec<WasiProcess>,
pub checkpoint: WasiProcessCheckpoint,
pub disable_journaling_after_checkpoint: bool,
pub snapshot_on: HashSet<SnapshotTrigger>,
pub wakers: Vec<Waker>,
pub snapshot_memory_hash: HashMap<MemorySnapshotRegion, u64>,
/* private fields */
}
Fields§
§pid: WasiProcessId
Unique ID of this process
threads: HashMap<WasiThreadId, WasiThread>
The threads that make up this process
thread_count: u32
Number of threads running for this process
signal_intervals: HashMap<Signal, WasiSignalInterval>
Signals that will be triggered at specific intervals
children: Vec<WasiProcess>
List of all the children spawned from this thread
checkpoint: WasiProcessCheckpoint
Represents a checkpoint which blocks all the threads and then executes some maintenance action
disable_journaling_after_checkpoint: bool
If true then the journaling will be disabled after the next snapshot is taken
snapshot_on: HashSet<SnapshotTrigger>
journal
only.List of situations that the process will checkpoint on
wakers: Vec<Waker>
Any wakers waiting on this process (for example for a checkpoint)
snapshot_memory_hash: HashMap<MemorySnapshotRegion, u64>
journal
only.The snapshot memory significantly reduce the amount of duplicate entries in the journal for memory that has not changed
Implementations§
Source§impl WasiProcessInner
impl WasiProcessInner
Sourcepub fn checkpoint<M: MemorySize>(
inner: LockableWasiProcessInner,
ctx: FunctionEnvMut<'_, WasiEnv>,
for_what: WasiProcessCheckpoint,
) -> WasiResult<MaybeCheckpointResult<'_>>
Available on crate feature journal
only.
pub fn checkpoint<M: MemorySize>( inner: LockableWasiProcessInner, ctx: FunctionEnvMut<'_, WasiEnv>, for_what: WasiProcessCheckpoint, ) -> WasiResult<MaybeCheckpointResult<'_>>
journal
only.Checkpoints the process which will cause all other threads to pause and for the thread and memory state to be saved
Sourcepub fn maybe_checkpoint<M: MemorySize>(
inner: LockableWasiProcessInner,
ctx: FunctionEnvMut<'_, WasiEnv>,
) -> WasiResult<MaybeCheckpointResult<'_>>
Available on crate feature journal
only.
pub fn maybe_checkpoint<M: MemorySize>( inner: LockableWasiProcessInner, ctx: FunctionEnvMut<'_, WasiEnv>, ) -> WasiResult<MaybeCheckpointResult<'_>>
journal
only.If a checkpoint has been started this will block the current process until the checkpoint operation has completed
pub fn do_checkpoints_from_outside(ctx: &mut FunctionEnvMut<'_, WasiEnv>)
journal
only.Trait Implementations§
Auto Trait Implementations§
impl Freeze for WasiProcessInner
impl !RefUnwindSafe for WasiProcessInner
impl Send for WasiProcessInner
impl Sync for WasiProcessInner
impl Unpin for WasiProcessInner
impl !UnwindSafe for WasiProcessInner
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more