Skip to content
This repository has been archived by the owner on Apr 13, 2022. It is now read-only.
/ exit-future Public archive

Future that resolves when an exit signal is set.

Notifications You must be signed in to change notification settings

paritytech/exit-future

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation


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.

About

Future that resolves when an exit signal is set.

Resources

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages