You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by GitBox <gi...@apache.org> on 2021/07/07 13:23:27 UTC

[GitHub] [activemq-artemis] gemmellr commented on pull request #3644: ARTEMIS-3327 Removing unecessary block operation on journal append record

gemmellr commented on pull request #3644:
URL: https://github.com/apache/activemq-artemis/pull/3644#issuecomment-875599939


   Depends on the provided values of 'sync' and 'callback'. The called _newSyncAndCallbackResult(sync, callback)_ method creating the future did this:
   `return (sync && callback == null) ? new SimpleFutureImpl<>() : SimpleFuture.dumb();`
   
   If asked to sync and there was no callback, it returns a 'proper future' that could be used to actually wait for the execution, and detect failures from thrown exceptions passed via the fail method.
   
   If not asked to sync, or a callback is given, it returns a 'dumb' future that doesnt wait at all and just returns null immediately, ignores completions/failures etc.
   
   I dont know what the sync and callback values actually are for this situation but I guess from that they were eitehr always false or non-null. Might be worth adding a check to that effect though.


-- 
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: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org