belliottsmith commented on code in PR #17:
URL: https://github.com/apache/cassandra-accord/pull/17#discussion_r1056544949


##########
accord-core/src/main/java/accord/utils/async/AsyncCallbacks.java:
##########
@@ -0,0 +1,45 @@
+package accord.utils.async;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.concurrent.Executor;
+import java.util.function.BiConsumer;
+
+public class AsyncCallbacks
+{
+    private static final Logger logger = 
LoggerFactory.getLogger(AsyncCallbacks.class);
+
+    private static final BiConsumer<Object, Throwable> NOOP = (unused, 
failure) -> {
+        if (failure != null)
+            logger.error("Exception received by noop callback", failure);
+    };
+
+    public static <T> BiConsumer<? super T, Throwable> noop()
+    {
+        return NOOP;
+    }
+
+    public static <T> BiConsumer<? super T, Throwable> inExecutor(BiConsumer<? 
super T, Throwable> callback, Executor executor)

Review Comment:
   Agreed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to