tetsy-exit-future

Crates.iotetsy-exit-future
lib.rstetsy-exit-future
version0.2.0
sourcesrc
created_at2021-02-24 06:56:47.533175
updated_at2021-02-24 06:56:47.533175
descriptionTetsy Future that signals exit to many receivers
homepage
repositoryhttps://github.com/tetcoin/tetsy-exit-future
max_upload_size
id359832
size5,810
Marlon Hanks (marlonhanks)

documentation

README

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.
Commit count: 10

cargo fmt