Skip to content

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

Merged
martinmr merged 2 commits intomasterfrom
wait
Aug 24, 2020
Merged

Add mechanism to wait for items to be processed.#184
martinmr merged 2 commits intomasterfrom
wait

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

balaji and others added 2 commits February 28, 2020 15:05
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