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
#_( | |
Let's say you have a threadpool doing work that requires access to some shared resource. | |
And this resource needs to be refreshed at times. E.g. an OAuth bearer token that can expire or be revoked. | |
If this resource were expensive to refresh, or subject to rate limiting (OAuth tokens are often both) | |
then it's desirable to refresh as little as possible. | |
It's undesirable, however, to mix complicated synchronization code for updating the resource in | |
with the business logic consuming it. | |
Enter the lock less monster, a lock free method for coordinating updates to a shared reference. |
OlderNewer