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

Async backlog #1612

Merged
merged 3 commits into from
Nov 13, 2020
Merged

Async backlog #1612

merged 3 commits into from
Nov 13, 2020

Conversation

mgravell
Copy link
Collaborator

See also #1574; rather than buffering (which helps, but just kicks the problem down a little), this moves ProcessBacklog to be truly async; it also checks for work before attempting to acquire the lock, to short-circuit high contention scenarios

- make the backlog processor async
- check for work *before* trying to get the lock
Copy link
Collaborator

@NickCraver NickCraver left a comment

Choose a reason for hiding this comment

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

👍 Much cleaner too

@ghost
Copy link

ghost commented Nov 16, 2020

@mgravell Just for curiosity, why are you using lock inside an async method instead of an async-friendly construct?

@IgorIgorevich94
Copy link

@mgravell Just for curiosity, why are you using lock inside an async method instead of an async-friendly construct?

I would assume that there is no point in introducing additional async overhead here, since there is no IO or Network stuff happening inside the lock code block.

@NickCraver NickCraver deleted the async-backlog branch March 7, 2022 00:32
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.

3 participants