interrupt

Function interrupt 

Source
pub fn interrupt(store_id: StoreId) -> Result<(), InterruptError>
Expand description

Interrupt the store with the given ID. Best effort is made to ensure interrupts are handled. However, there is no guarantee; under rare circumstances, it is possible for the interrupt to be missed. One such case is when the target thread is about to call WASM code but has not yet made the call.

To make sure the code is interrupted, the target thread should notify the signalling thread that it has finished running in some way, and the signalling thread must wait for that notification and retry the interrupt if the notification is not received after some time.