In my RoR application (Ruby 2.0.0, Rails 4.0), I have a set of statements:
a = user.get_some_data
b = car.get_car_parts
c = home.get_temperature
d = random.get_random_data
aggregated = a + b + c + d
As deliberately shown above, the execution that assigns values to variables a, b, c and d are independent and happen in any order, or in parallel. I have Parallel Gem in my Gemfile so this should be easy, however it does not seem to support non collection statements pretty well. Any way I can parralelize the statements and wait for execution at aggregated variable to get all the data?