RubyMoney/eu_central_bank — pull request #23 by saurabhnanda (2014-01-08 03:07:32+00:00)
Title: New test + fixtures to ensure that update_rates is atomic in nature.

The test spawns 2 threads, one thread keeps updating the @bank object with
odd rates and the other with even rates. At no point in time should @bank.rates
have, both, odd AND even rates, i.e. either the rates should be all odd,
or they should be all even.

Added test to ensure that EuCentralBank.exchange function always returns a
consistent exchange rate, even if some other thread is updating the rate-table
concurrently.

Updated to work with changed API of VariableExchange. Not EuCentralBank.update_parsed_rate
and EuCentralBank.exchange_with are atomic in nature