Skip to content

GH-116968: Remove branch from advance_backoff_counter #124469

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

Merged
merged 2 commits into from
Oct 7, 2024

Conversation

markshannon
Copy link
Member

@markshannon markshannon commented Sep 24, 2024

Removes the branch from advance_backoff_counter so that it is just an increment, as the name suggests.

}

static inline bool
backoff_counter_triggers(_Py_BackoffCounter counter)
{
return counter.value == 0;
/* Test whether the value is zero and the backoff is not UNREACHABLE_BACKOFF */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not testing that the value is zero. Is this comment accurate?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it is testing whether the value is zero. The value is the high bits, so value == 0 for any value_and_backoff < (1 << BACKOFF_BITS)

@markshannon markshannon merged commit f55273b into python:main Oct 7, 2024
55 of 59 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants