Releases: plabayo/tokio-graceful
Releases · plabayo/tokio-graceful
0.2.1
Expose a signal that can be awaited on without awaiting the configured
delay first. If no delay is used this API is equivalent to the already
existing cancelled
function.
This can be used for scenarios where you do not need a graceful buffer and would like to
cancel as soon as a signal is received.
0.2.0
This is usability wise not a breaking release,
however it does make changes to the API which might break subtle edge cases
and it also increases the MSRV to 1.75.
New Features:
- add a delay (Duration) that can be used
to trigger the cancel notification to ongoing jobs once the shutdown trigger (signal)
has been received; - add a second signal factory that can be used to create an overwrite
signal to be created and triggered once the main signal has been triggered,
as an alternative to the jobs being complete or max delay has been reached.
Both features can be configured using the newly introduced ShutdownBuilder
,
which can be made directly or via Shutdown::builder
.
0.1.6
0.1.5
- Support and use Loom for testing;
- Fixes a bug in the private trigger code where a race condition could cause a deadlock (found using loom);
- Signal / Project support for the Windows platform;
- affected code:
crate::default_signal
andcrate::Shutdown::default
;- Unix and Windows are supported and have this code enabled;
- Other platforms won't have this code;
- When using Loom this code is also not there;
- This fixes build errors for platforms that we do not support for the default signal;
- affected code:
0.1.4
0.1.3
- Support and add Waitgroup example;
- Fix mistake in docs (thank you Mike Cronce);
- Update 0.1.2 changelog to highlight the library is no longer 100% Rust Safe Code;
0.1.2
- Fix typos in README (thank you @hds);
- Performance improvements (thank you awake readers on Reddit);
- add more docs to README and internal code;
- library is no longer 100% safe Rust code, due to usage of
https://doc.rust-lang.org/stable/std/mem/struct.ManuallyDrop.html in an internal struct;