Hi all, Ive recently been trying to figure out a way to make a long running background task scale accross all CPUs in Ruby on Rails, since multi-processing (not multi-threading) seems like the way to go.
A theoretical example would be: # code in controller def do_something @mydata = Hash.new # Start 4 background processes # and start adding data to @mydata # Page loads while the processes are working, displaying # something like "We are currently processing your data" end Question is how to handle reading/writing to @mydata safely because 4 processes would be trying to read/write to it? What is the best way to approach this problem? Thanks, Petr -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---