Hello anyone with some experience to use continuation across different http request? I try to implement a web service method like below: def getallnotes(userid) $contHash = Hash.new unless $contHash $contHash[userid].call if $contHash[userid] curr_idx = 0 while curr_idx < @notes.size callcc {|continuation| $contHash[userid] = continuation return @notes[curr_idx, 5] } curr_idx += 5 end $contHash.delete(userid) nil end The idea is that if the @notes is too big, return all the data once may not be a good idea. So each time I just return 5 data. then use continuation to store the context. Then if same user call this method again, it will jump to the point of last execution to return the next 5 data. But I got the error: "continuation called across threads" Is it possible to use continuation in rails that way? -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---