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

Simplify the management of the "waiting for response" state in ExchangeContext #4204

Closed
yufengwangca opened this issue Dec 15, 2020 · 3 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@yufengwangca
Copy link
Contributor

Problem

    CancelResponseTimer();

    // If the context was expecting a response to a previously sent message, this message
    // is implicitly that response.
    SetResponseExpected(false);

Check if we can simplify the management of the "waiting for response" state in ExchangeContext

Proposed Solution

Simplify the management of the "waiting for response" state in ExchangeContext

@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label feature_request to this issue, with a confidence of 0.93. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@bzbarsky-apple
Copy link
Contributor

In particular, can we avoid needing two function calls that have to come together to manage the state properly?

@woody-apple woody-apple added enhancement New feature or request and removed feature request labels Feb 2, 2021
@woody-apple woody-apple added this to the Not sure when milestone Feb 2, 2021
@yufengwangca
Copy link
Contributor Author

We are cleaning up the pending issue now, I think setting the response expected to false separately after receiving the response make the code easier to understand.

    // Since we got the response, cancel the response timer.
    CancelResponseTimer();

    // If the context was expecting a response to a previously sent message, this message
    // is implicitly that response.
    SetResponseExpected(false);

Close for now and will reopen later if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants