Simplify Lock #422

Merged
merged 1 commit into from Jan 6, 2017

Projects

None yet

2 participants

@mjangda
Member
mjangda commented Jan 6, 2017

Instead of cache.get => cache.add for locking, just rely on cache.add since it's atomic and bails if the lock is already set. This also reduces races due to https://en.wikipedia.org/wiki/Time_of_check_to_time_of_use

@mjangda mjangda Simplify Lock
Instead of `cache.get => cache.add` for locking, just rely on `cache.add` since it's atomic and bails if the lock is already set. This also reduces races due to https://en.wikipedia.org/wiki/Time_of_check_to_time_of_use
b47ccbf
@mjangda mjangda added the needs review label Jan 6, 2017
@joshbetz joshbetz merged commit 51a153b into master Jan 6, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@joshbetz joshbetz deleted the update/lastpostmodified-lock branch Jan 6, 2017
@mjangda
Member
mjangda commented Jan 13, 2017

r86902-deploy

@mjangda mjangda added the deployed label Jan 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment