parseq icon indicating copy to clipboard operation
parseq copied to clipboard

=promise Optimize `toCompletableFuture` implantation if it's already …

Open He-Pin opened this issue 3 years ago • 2 comments

Optimize toCompletableFuture implantation if it's already completed.

He-Pin avatar Mar 17 '21 13:03 He-Pin

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 avatar May 19 '21 19:05 junchuanwang

@junchuanwang Ha, busy at work, The purpose is to reduce a closure creation.

He-Pin avatar May 20 '21 07:05 He-Pin