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

[Enhancement] Avoid unnecessary waiting when a response is successfully returned #8261

Open
1 task done
3424672656 opened this issue Jun 5, 2024 · 0 comments · May be fixed by #8272
Open
1 task done

[Enhancement] Avoid unnecessary waiting when a response is successfully returned #8261

3424672656 opened this issue Jun 5, 2024 · 0 comments · May be fixed by #8272

Comments

@3424672656
Copy link
Contributor

Before Creating the Enhancement Request

  • I have confirmed that this should be classified as an enhancement rather than a bug/feature.

Summary

image
public Message request(final Message msg, long timeout) Internal logic
image
image
image

Use countDownLatch to implement synchronization logic, but the thread is forced to wake up only after a timeout, and to wait until the timeout returns after a successful response,Therefore, after a successful response, the countDown() function should be called to wake up the thread to return, and do not do ineffective sleep

Motivation

Avoid unnecessary waiting when a response is successfully returned

Describe the Solution You'd Like

after a successful response, the countDown() function should be called to wake up the thread to return, and do not do ineffective sleep

Describe Alternatives You've Considered

null

Additional Context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant