Async backlog by mgravell · Pull Request #1612 · StackExchange/StackExchange.Redis
Conversation
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
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Much cleaner too
@mgravell Just for curiosity, why are you using lock inside an async method instead of an async-friendly construct?
@mgravell Just for curiosity, why are you using
lockinside 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters