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

Download history 40542/week @ 2024-07-21 36008/week @ 2024-07-28 39561/week @ 2024-08-04 54152/week @ 2024-08-11 34729/week @ 2024-08-18 43505/week @ 2024-08-25 50193/week @ 2024-09-01 45103/week @ 2024-09-08 39694/week @ 2024-09-15 43561/week @ 2024-09-22 44719/week @ 2024-09-29 46955/week @ 2024-10-06 45688/week @ 2024-10-13 51627/week @ 2024-10-20 39903/week @ 2024-10-27 55069/week @ 2024-11-03

194,568 downloads per month
Used in 79 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
~15K SLoC