Round robin through connections in pool in place of rand to ensure an even distribution for put/reserve.
Add a new API call which takes a block to ensure that commands occur on the tube you want in a threaded environment. For example beanstalk.on_tube('foo') do |connection| connection.put 'bar' end This will send a USE and then a PUT surrounded by lock so that another thread can't put on the wrong tube.
* UnexpectedResponses are, contrary to their name, expected * This was just causing connections to be opened unnecessarily The previous patch necessitates this, since the connection referenced in the job will now be closed (correctly), and the job will be left with no connection to excecute e.g. a delete after a DEADLINE_SOON
I'm not sure if getting a logger in here makes more sense, but this is definitely annoying as it is.