InterruptHandle

Trait InterruptHandle 

Source
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§

Source

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.

Source

fn dropped(&self) -> bool

Returns true if the corresponding sandbox has been dropped

Implementors§