çµè«ããè¨ãã¨ãå¼·å㪠CPU ã¨å¤§å®¹éã®ã¡ã¢ãªãç¨æã㦠Thread ã大éã«ä½ãã®ãä¸çªéãã ã ãããã¨ãã®ä¸ç¡ããããããéããã ããä»æ¹ãªãã def self.post tokens = [] User.all.each do |u| tokens << OAuth::AccessToken.new(consumer, u.token, u.secret_token) end tokens.each do |a| @t = Thread.start do res = a.post('/statuses/update.json', {:status => "ãªãã»ã©åæãããã¼ã®"}) rescue nil end end @t.join end ãããªã®ãæ¬å½ã«ã ããã®ã ãã©ãããã§ååãªã®ã ãããããããªããã¨ããã Ruby ã§ããéããããä¸çªéãããã¡ã®ãããªãã®ãµã¼
{{#tags}}- {{label}}
{{/tags}}