-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't refresh automatically when waiting for a slow reload (fixed #175)
If the load time exceeded the refreshAfterWrite time then a new refresh is triggered and the previous was ignored. This was due to how the write timestamp is used, which was set to the current time to delay expiration and refresh. When the refresh completes it CAS's to the new value only if no other writes occurred (so as to not stomp explicit writes and reload a stale read). The slow reload meant that only the last refresh would be honored, which may not occur for a long time on a busy system. This also removes a sync vs async difference that I never remembered why it was in place. Async didn't have this problem due to the timestamp being pushed out into the distant future. Since I didn't recall why these were special cased I had kept them as is, hoping the previous me was smarter than the current. Seems both were pretty dumb.
- Loading branch information
Showing
7 changed files
with
272 additions
and
129 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.