belliottsmith commented on code in PR #17: URL: https://github.com/apache/cassandra-accord/pull/17#discussion_r1053788538
########## 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: From an efficiency perspective, I disagree this is material, as the bulk of cost can be resolved with an override to `beginAsResult`. However, from an ergonomics perspective I agree this is suboptimal. I have pushed branches* that make `AsyncResult` and `AsyncChain` so that it can be used directly wherever an `AsyncChain` would be, and we avoid any conversion. The only semantic difference is that an `AsyncResult` may have an unlimited number of distinct `AsyncChain` started from them, so they create a kind of synchronisation point in the chain. * https://github.com/belliottsmith/cassandra-accord/tree/async-chains-suggest https://github.com/belliottsmith/cassandra/tree/async-chains-suggest -- 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]

