Show the crate…
1 unstable release
0.2.0 | Feb 24, 2021 |
---|
#9 in #cloneable
88 downloads per month
Used in 23 crates
(via tc-service)
6KB
124 lines
Tetsy Exit Future
Documentation
Create a Signal
and cloneable Exit
future that fires when Signal
is fired or dropped.
Used to coordinate exit between multiple event-loop threads.
let (signal, exit) = tetsy_exit_future::signal();
::std::thread::spawn(move || {
// future resolves when signal fires
exit.wait();
});
let _ = signal.fire(); // also would fire on drop.
Dependencies
~1MB
~15K SLoC