parseq
parseq copied to clipboard
=promise Optimize `toCompletableFuture` implantation if it's already …
Optimize toCompletableFuture
implantation if it's already completed.
Hi @hepin1989 Sorry for the late reply! Thanks for submitting the change! May I know the motivation of the change? From what I see, there is quite limited improvement.
Since the addListner
also handles the case of "resolved promise" immediately in its function logic, which is equivalent to the "isDone()" branch you are proposing.
@junchuanwang Ha, busy at work, The purpose is to reduce a closure creation.