Skip to content

Fix deadlocks, small improvements - #33

Open
mediaslave24 wants to merge 3 commits into
dv:masterfrom
mediaslave24:fix-deadlock
Open

Fix deadlocks, small improvements#33
mediaslave24 wants to merge 3 commits into
dv:masterfrom
mediaslave24:fix-deadlock

Conversation

@mediaslave24

Copy link
Copy Markdown

Fix deadlocks from #18.
Initialize redis after use_local_time, because use_local_time is incorrect option for redis client.
Use Enumerable#find in #locked? method for shorter code and don't shadow outer "token" variable.
Don't depend on calls to another methods in #create! (set the value right here).

Comment thread spec/semaphore_spec.rb Outdated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Line is too long. [103/80]

Comment thread spec/semaphore_spec.rb

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Place the . on the previous line, together with the method call receiver.

@dv

dv commented Jun 21, 2015

Copy link
Copy Markdown
Owner

Hey @mediaslave24 thanks for contributing. However I found some problems with your code. Could you go through my comments and update, then I'll merge. Thanks!

@dv dv added the needs work label Jan 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants