pub struct WasiProcessInner {Show 13 fields
pub pid: WasiProcessId,
pub(crate) waiting: Arc<AtomicU32>,
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 stop_running_after_checkpoint: bool,
pub snapshot_on: HashSet<SnapshotTrigger>,
pub wakers: Vec<Waker>,
pub snapshot_memory_hash: HashMap<MemorySnapshotRegion, u64>,
pub(super) backoff: WasiProcessCpuBackoff,
}Fields§
§pid: WasiProcessIdUnique ID of this process
waiting: Arc<AtomicU32>Number of threads waiting for children to exit
threads: HashMap<WasiThreadId, WasiThread>The threads that make up this process
thread_count: u32Number 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: WasiProcessCheckpointRepresents a checkpoint which blocks all the threads and then executes some maintenance action
disable_journaling_after_checkpoint: boolIf true then the journaling will be disabled after the next snapshot is taken
stop_running_after_checkpoint: boolIf true then the process will stop running after the next snapshot is taken
snapshot_on: HashSet<SnapshotTrigger>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>The snapshot memory significantly reduce the amount of duplicate entries in the journal for memory that has not changed
backoff: WasiProcessCpuBackoffRepresents all the backoff properties for this process which will be used to determine if the CPU should be throttled or not
Implementations§
Source§impl WasiProcessInner
impl WasiProcessInner
Sourcepub fn checkpoint<M: MemorySize>(
inner: LockableWasiProcessInner,
ctx: FunctionEnvMut<'_, WasiEnv>,
for_what: WasiProcessCheckpoint,
) -> WasiResult<MaybeCheckpointResult<'_>>
pub fn checkpoint<M: MemorySize>( inner: LockableWasiProcessInner, ctx: FunctionEnvMut<'_, WasiEnv>, for_what: WasiProcessCheckpoint, ) -> WasiResult<MaybeCheckpointResult<'_>>
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<'_>>
pub fn maybe_checkpoint<M: MemorySize>( inner: LockableWasiProcessInner, ctx: FunctionEnvMut<'_, WasiEnv>, ) -> WasiResult<MaybeCheckpointResult<'_>>
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>)
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§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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