Commit 261214ef authored by Jacob Vosmaer's avatar Jacob Vosmaer

Make comment less ambivalent

parent f4d478a6
......@@ -23,8 +23,7 @@ def initialize(key, timeout:)
# Try to obtain the lease. Return true on succes,
# false if the lease is already taken.
def try_obtain
# This is expected to be atomic because we are talking to a
# single-threaded Redis server.
# Performing a single SET is atomic
!!redis.set(redis_key, '1', nx: true, ex: @timeout)
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment