Struct runtime_loop::RuntimeLoop [] [src]

pub struct RuntimeLoop { /* fields omitted */ }

Methods

impl RuntimeLoop
[src]

[src]

Constructs a new RuntimeLoop.

[src]

Sometimes we want to be able to cancel the loop from the outside. Before we start this loop in its own thread with run(), we can grab the cancel_flag and set it to true.

[src]

The runtime loop will continue to check a list of pollable closures. This is how you add such a closure.

[src]

run() will cause a blocking loop and return a result. It is recommended, but unnecessary to call run() by using thread::spawn(...) it can be canceled using the cancel flag. See get_cancel_flag().