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

Add mechanism to wait for items to be processed. #184

Merged
merged 2 commits into from
Aug 24, 2020
Merged

Add mechanism to wait for items to be processed. #184

merged 2 commits into from
Aug 24, 2020

Conversation

martinmr
Copy link
Contributor

@martinmr martinmr commented Aug 20, 2020

Cache operations are handled asynchronously. Calling the Wait method will add an item to the
process queue and block until that item is processed. Useful to ensure all the previous items
have been processed before proceeding.


This change is Reviewable

Copy link
Contributor

@manishrjain manishrjain left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 1 files at r2.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @anurags92 and @karlmcguire)

@blixt
Copy link

blixt commented Oct 13, 2021

Sorry for jumping into such an old PR but I was wondering if anyone has since tested the concurrency behavior of this approach? I would have expected there to be a SetSync(…) method instead which returns once the item has been set. By calling Set(…) followed by Wait(…) you may end up waiting for many other items being set by other threads, which on a busy server can average out to a large performance downgrade.

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

Successfully merging this pull request may close these issues.

3 participants