Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

=promise Optimize toCompletableFuture implantation if it's already … #296

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

He-Pin
Copy link

@He-Pin He-Pin commented Mar 17, 2021

Optimize toCompletableFuture implantation if it's already completed.

@junchuanwang junchuanwang self-requested a review May 19, 2021 19:33
@junchuanwang
Copy link
Contributor

junchuanwang commented May 19, 2021

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.

@He-Pin
Copy link
Author

He-Pin commented May 20, 2021

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

@He-Pin He-Pin force-pushed the optimize branch 2 times, most recently from 48b38b4 to c09b10e Compare May 20, 2021 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants