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

#1129 in Concurrency

Download history 37193/week @ 2024-02-26 30580/week @ 2024-03-04 31068/week @ 2024-03-11 34800/week @ 2024-03-18 32623/week @ 2024-03-25 42951/week @ 2024-04-01 44789/week @ 2024-04-08 37002/week @ 2024-04-15 35853/week @ 2024-04-22 26965/week @ 2024-04-29 26059/week @ 2024-05-06 31888/week @ 2024-05-13 30558/week @ 2024-05-20 39151/week @ 2024-05-27 33428/week @ 2024-06-03 31804/week @ 2024-06-10

135,749 downloads per month
Used in 80 crates (via sc-service)

MIT license

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
~16K SLoC