2007å¹´05æ18æ¥03:30 ã«ãã´ãª ruby & perl - 軽éããã»ã¹ãthreadã§ä»£ç¨ erlangã§å¯ä¸èãã軽éããã»ã¹ã§ãããããã¯threadã§ãæ¯è¼çç°¡åã«ä»£ç¨ã¯ã§ãã¾ãã Rubyist Magazine - Rubyist ã®ããã®ä»è¨èªæ¢è¨ª ã第 10 åã Erlangã§ç´¹ä»ããã¦ããErlang Landã®ãã£ããããæ°ãéåæã§è¨ç®ããä¾ã¯ãrubyã§æ¸ãã¨ãããªæãã«ãªãã§ãããã thrfib.rb require 'thread' require 'Common' def worker(n, q) return Thread.new do q.push("fib(#{n}) = #{fib(n)}") end end def manager(n, q) Thread.new do n.times { puts q.shift } end end
{{#tags}}- {{label}}
{{/tags}}