stchang / redis

A redis client for Racket.
17 stars 4 forks source link

Fix up further concurrency bugs and polish implementation. #9

Closed m4burns closed 9 years ago

m4burns commented 10 years ago

I had another look and rewrote some of the pool code. Connection cleanup is now done in the client thread unless the connection is being returned from a dead thread. The dead thread return path now also checks that the connection returned still has its owner set to the dead thread (it could happen that a thread returns a connection and then subsequently dies; the manager thread would previously double-return the connection if it had been leased out to another client thread).

I also implemented a torture test for the connection pool and fixed a couple timing issues in the redis tests.

All tests pass on my machine.

I believe the tests now confirm that issues #8, #7, and #6

stchang commented 9 years ago

Merged in a0d49ce0fad296926664c830239d6d3850d5f184