6 releases
0.2.0 | Dec 4, 2019 |
---|---|
0.1.4 | Mar 20, 2019 |
0.1.3 | Dec 21, 2018 |
0.1.2 | Jul 2, 2018 |
0.1.0 | Apr 16, 2018 |
#20 in #dropped
194,568 downloads per month
Used in 79 crates
(via sc-service)
6KB
124 lines
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) = 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