mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore(deps): bump http, hyper etc. to 1.0; jsonrpsee 0.23 (#7018)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
@ -13,8 +13,6 @@ use std::{
|
||||
use tokio::sync::oneshot;
|
||||
|
||||
/// A Future that resolves when the shutdown event has been fired.
|
||||
///
|
||||
/// The [`TaskManager`](crate)
|
||||
#[derive(Debug)]
|
||||
pub struct GracefulShutdown {
|
||||
shutdown: Shutdown,
|
||||
@ -25,6 +23,13 @@ impl GracefulShutdown {
|
||||
pub(crate) fn new(shutdown: Shutdown, guard: GracefulShutdownGuard) -> Self {
|
||||
Self { shutdown, guard: Some(guard) }
|
||||
}
|
||||
|
||||
/// Returns a new shutdown future that is ignores the returned [`GracefulShutdownGuard`].
|
||||
///
|
||||
/// This just maps the return value of the future to `()`, it does not drop the guard.
|
||||
pub fn ignore_guard(self) -> impl Future<Output = ()> + Send + Sync + Unpin + 'static {
|
||||
self.map(drop)
|
||||
}
|
||||
}
|
||||
|
||||
impl Future for GracefulShutdown {
|
||||
|
||||
Reference in New Issue
Block a user