From eb59474550c06bee0af13b65bffbde7d57552302 Mon Sep 17 00:00:00 2001 From: kerr Date: Mon, 10 Oct 2022 18:44:54 +0800 Subject: [PATCH] Document not to reuse/cache EmitFailureHandle#busyLooping (#3224) --- reactor-core/src/main/java/reactor/core/publisher/Sinks.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/reactor-core/src/main/java/reactor/core/publisher/Sinks.java b/reactor-core/src/main/java/reactor/core/publisher/Sinks.java index 07efd2448b..e9183e4ba6 100644 --- a/reactor-core/src/main/java/reactor/core/publisher/Sinks.java +++ b/reactor-core/src/main/java/reactor/core/publisher/Sinks.java @@ -269,7 +269,8 @@ public interface EmitFailureHandler { *

* As a result there will always be some delay between this computation and the actual first * use of the handler (at a minimum, the time it takes for the first sink emission attempt). - * Consider this when choosing the {@link Duration}, and probably prefer something above 100ms. + * Consider this when choosing the {@link Duration}, and probably prefer something above 100ms, + * and don't cache the returning handler for later usage. * * @param duration {@link Duration} for the deadline * @return an optimistic and bounded busy-looping {@link EmitFailureHandler}