redis-semaphore
redis-semaphore copied to clipboard
Generated signal is not unique
The wait/signal usage pattern described in the Readme says that "signal puts the specified token back on the semaphore, or generates a unique new token and puts that back if none is passed". Looking at the signal
method, however, it looks like it will never generate a new token. It will either use the provided token or use 1
as the token.
def signal(token = 1)
token ||= generate_unique_token
# other stuff
end