pub trait InterruptHandle:
Send
+ Sync
+ Debug {
// Required methods
fn kill(&self) -> bool;
fn dropped(&self) -> bool;
}Expand description
A trait for handling interrupts to a sandbox’s vcpu
Required Methods§
Sourcefn kill(&self) -> bool
fn kill(&self) -> bool
Interrupt the corresponding sandbox from running.
- If this is called while the the sandbox currently executing a guest function call, it will interrupt the sandbox and return
true. - If this is called while the sandbox is not running (for example before or after calling a guest function), it will do nothing and return
false.
§Note
This function will block for the duration of the time it takes for the vcpu thread to be interrupted.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".