Closed arnodirlam closed 9 years ago
That's not the semantic connection_pool provides (and it wouldn't work with Redis since you can't have two operations running in parallel on different connections, Redis is single-threaded). Your scenario would allow a single thread to exhaust the pool with, e.g., a poorly written recursive function.
I'm using sidekiq and connection_pool. I was trying to get two Redis connections from one pool in a single thread, one pipelined, one not. I expected to get two different connections using this code example:
However, it's the same connection, so everything I do with conn2 naturally is pipelined as well. Is there a way to get two different connections from one pool in a single thread? If not, would that be something you'd consider or accept a pull request for?