2013-05-27から1日間の記事一覧
Ruby の Monitor と ConditionVariable の使い方 なかなかぐぐっても日本語の資料が見つからなかったので自分で動かしてみた。(ぐぐる能力低い) まずThreadの直列化 require "thread" require "monitor" moni = Monitor.new val = 0 Thread.new { 3.times { …
Ruby の Monitor と ConditionVariable の使い方 なかなかぐぐっても日本語の資料が見つからなかったので自分で動かしてみた。(ぐぐる能力低い) まずThreadの直列化 require "thread" require "monitor" moni = Monitor.new val = 0 Thread.new { 3.times { …