mhenrixon/sidekiq-unique-jobs — pull request #68 by kratob (2014-12-15 13:49:33+00:00)
Title: Use redis connections in a thread-safe way

Sidekiq's connection pool expects to be used as follows:
```ruby
connection_pool.with do |connection|
# do something with the connection
end
# dont use the connection any more!
```

Using the connection after the end of the block means, that connections will be shared across threads. This will cause deadlocks.

I couldn't see a great way to write a test for this. Existing tests pass.