Skip to content

Conversation

eugenk
Copy link
Contributor

@eugenk eugenk commented Jul 9, 2016

This shall fix #45.

Instead of only checking for the tokens that the current instance knows about, the tokens are fetched from Redis in the locked? method.


describe "semaphore without staleness checking" do
let(:semaphore) { Redis::Semaphore.new(:my_semaphore, :redis => @redis) }
let(:semaphore2) { Redis::Semaphore.new(:my_semaphore, :redis => @redis) }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the new Ruby 1.9 hash syntax.

@eugenk
Copy link
Contributor Author

eugenk commented Jul 9, 2016

All the comments of Hound are targeted at code that has been there before. I'd rather not obey Hound in this pull request to keep the changes simple for the review.

@dv: If you want me to, I will change the name of the inner token variable and the hash syntax, but only if you tell me to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Recognize the lock state of multiple semaphores using the same key

2 participants