From 317b0abd7b44bffd76b7f1039937e7288464720f Mon Sep 17 00:00:00 2001 From: Tatsuya Kawano Date: Tue, 5 Jul 2022 06:51:36 +0800 Subject: [PATCH] Support notification on eviction Remove unused function and struct. --- src/future/cache.rs | 2 +- src/notification/notifier.rs | 4 ---- src/sync_base/base_cache.rs | 4 ---- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/future/cache.rs b/src/future/cache.rs index 6816fb6a..2b6240eb 100644 --- a/src/future/cache.rs +++ b/src/future/cache.rs @@ -442,7 +442,7 @@ use std::{ /// ## Delivery Modes for Eviction Listener /// /// The [`DeliveryMode`][delivery-mode] specifies how and when an eviction -/// notifications should be delivered to an eviction listener. Currently, the +/// notification should be delivered to an eviction listener. Currently, the /// `future::Cache` supports only one delivery mode: `Queued` mode. /// /// A future version of `future::Cache` will support `Immediate` mode, which will be diff --git a/src/notification/notifier.rs b/src/notification/notifier.rs index 884ec247..5c2c0940 100644 --- a/src/notification/notifier.rs +++ b/src/notification/notifier.rs @@ -123,10 +123,6 @@ impl BlockingRemovalNotifier { } } -// pub(crate) struct NonBlockingRemovalNotifier { -// _phantom: std::marker::PhantomData<(K, V)>, -// } - pub(crate) struct ThreadPoolRemovalNotifier { snd: Sender>, state: Arc>, diff --git a/src/sync_base/base_cache.rs b/src/sync_base/base_cache.rs index df16cd2f..b659bde4 100644 --- a/src/sync_base/base_cache.rs +++ b/src/sync_base/base_cache.rs @@ -566,10 +566,6 @@ impl<'a, K, V> EvictionState<'a, K, V> { self.notifier.is_some() } - // fn is_batch_notification_supported(&self) -> bool { - // self.removed_entries.is_some() - // } - fn add_removed_entry( &mut self, key: Arc,