coinbase/coinbase-ruby — pull request #6 by kyledrake (2013-04-17 21:05:19+00:00)
Title: Concurrent batching support for client

**Please do not merge this until I give an OK.** I did this on the plane and haven't got gotten a chance to test it with the live API yet.

The client can now be batched to run multiple requests concurrently. If you have to make a lot of API calls (for example, to get balances for a lot of users simultaneously), this will improve performance significantly. Under the hood, it uses internal threading to take advantage of Ruby's non-blocking IO model (one IO request per thread):

```ruby
buy_price, sell_price = coinbase.batch do |client|
client.buy_price 1
client.sell_price 1
end

buy_price.inspect # => #
```