ã¡ãã£ã¨ãã£ã¦ã¿ããå¼ã³åºããç´ååãããã¨ããããã½ãªãããããªæãããªãã class ActorsOffice def initialize(actor) @queue = Queue.new @thread = Thread.new(actor) do catch(actor) do while true msg, arg, blk = @queue.pop actor.__send__(msg, *arg, &blk) end end end end def __thread__; @thread; end def method_missing(m, *a, &b) @queue.push([m, a, b]) end end 使ç¨ä¾ã¤ãã¯ä»¥ä¸ã®éãã
{{#tags}}- {{label}}
{{/tags}}