You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2022/12/17 07:09:17 UTC
[GitHub] [cassandra-accord] belliottsmith commented on a diff in pull request #17: Async chain
belliottsmith commented on code in PR #17:
URL: https://github.com/apache/cassandra-accord/pull/17#discussion_r1051331275
##########
accord-core/src/main/java/accord/utils/async/AsyncResult.java:
##########
@@ -0,0 +1,96 @@
+package accord.utils.async;
+
+import java.util.concurrent.Executor;
+import java.util.function.BiConsumer;
+
+/**
+ * Handle for async computations that supports multiple listeners and registering
+ * listeners after the computation has started
+ */
+public interface AsyncResult<V>
Review Comment:
I asked to remove it, for two reasons: 1) it’s a lot of code duplication; 2) it encourages precisely what we’re trying to avoid. There’s no easy way to impose a “no more than one hop” restriction.
we could introduce some syntactic sugar for constructing a chain perhaps, that is then applied here, but I do not think these use cases warrant the escape route of dedicated map methods for the AsyncResult.
--
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: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org