ptupitsyn commented on a change in pull request #8870:
URL: https://github.com/apache/ignite/pull/8870#discussion_r599319169



##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/util/future/IgniteFutureImpl.java
##########
@@ -68,7 +80,10 @@ public IgniteFutureImpl(IgniteInternalFuture<V> fut) {
     @Override public void listen(IgniteInClosure<? super IgniteFuture<V>> 
lsnr) {
         A.notNull(lsnr, "lsnr");
 
-        fut.listen(new InternalFutureListener(lsnr));
+        if (defaultExecutor != null && !isDone())
+            fut.listen(new InternalFutureListener(new 
AsyncFutureListener<>(lsnr, defaultExecutor)));

Review comment:
       We don't overwrite `lsnr`. We wrap `lsnr` into `AsyncFutureListener` 
which uses the provided executor to run the delegate.




-- 
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.

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


Reply via email to