kenn/redis-mutex — Issue #1: unlock problem
Author: kkkk9
Created: 2012-01-05 15:09:32+00:00
State: open

def unlock(force=false)
@locking = false
self.del if self.get.to_f == @expires_at or force # Release the lock if it seems to be yours
end

use equal with float is not a good idea.

self.del if (self.get.to_f - @expires_at).abs < 0.00001 or force ?