I am using multi Threading concept to optimize performance of long
array which takes long time to do action with every element. I
used .peach in my code
require ‘peach’
def fr_display
@graph = Koala::Facebook::GraphAPI.new(session[:fbuser]
[“credentials”][“token”])
@friends = @graph.get_connections("me", "friends")
@img=Array.new(@friends.size)
i=1
@friends.peach do |friend|
begin
@img[i]=self.get_fb_image(friend[‘id’],friend[‘name’])
rescue StandardError => e
@img[i]="";
end
i=i+1
end
end
but in heroku deployment it is not running and showing error in error
log that New Thread is unable to create.
any solution to work with Multi threading in rails 3 heroku project or
optimize performance without using multi threading.
Thank You in advance