Missing Rust features to control threads execution.
Example:
```rust use std::thread; use thread_control::*;
fn main() {
let (flag, control) = makepair();
let handle = thread::spawn(move || {
while flag.alive() {
}
});
asserteq!(control.isdone(), false);
control.stop(); // Also you can control.interrupt()
it
handle.join();
asserteq!(control.isinterrupted(), false);
asserteq!(control.is_done(), true);
}
```
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.