Function gcore::exec::wait

source ·
pub fn wait() -> !
Expand description

Pause the current message handling.

If the message handling needs to be paused, e.g., to wait for another execution to finish, one should use this function. wait completes the current message handles execution with a special result and puts this message into the waiting queue to be awakened using the correspondent wake function later. All gas that hasn’t yet been spent is attributed to the message in the waiting queue.

This call delays message execution for a maximum amount of blocks that could be paid.

§Examples

use gcore::exec;

#[no_mangle]
extern "C" fn handle() {
    // ...
    exec::wait();
}