Created
September 11, 2014 18:02
-
-
Save phstc/5c4d0047166fe680e3f0 to your computer and use it in GitHub Desktop.
Easy distributed locks using Redis - https://wombat.co/blog/easy_distributed_locks_using_redis/
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
# Lock while executing `do_something` or expire in 10 seconds | |
Wombat::Mutex.exclusive 'my_key', 10 do | |
do_something | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment