From ae424ec67cb05fb710be11cd52d2b0c99df2b244 Mon Sep 17 00:00:00 2001 From: "Kenneth J. Shackleton" Date: Tue, 25 Jun 2024 08:13:17 +0100 Subject: [PATCH] Replace scheduleAtFixedRate when evicting with scheduleWithFixedDelay for single object pool. Signed-off-by: Kenneth J. Shackleton --- .../main/kotlin/com/bloomberg/selekt/pools/SingleObjectPool.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selekt-java/src/main/kotlin/com/bloomberg/selekt/pools/SingleObjectPool.kt b/selekt-java/src/main/kotlin/com/bloomberg/selekt/pools/SingleObjectPool.kt index eed41aaeaa..efbcc0a9a0 100644 --- a/selekt-java/src/main/kotlin/com/bloomberg/selekt/pools/SingleObjectPool.kt +++ b/selekt-java/src/main/kotlin/com/bloomberg/selekt/pools/SingleObjectPool.kt @@ -118,7 +118,7 @@ class SingleObjectPool>( if (evictionIntervalMillis < 0L || isClosed) { return } - future = executor.scheduleAtFixedRate( + future = executor.scheduleWithFixedDelay( ::evict, evictionDelayMillis, evictionIntervalMillis,