From a3b20c77f2d6496362806ddc3886f42d76298625 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Thu, 24 May 2012 22:52:04 +0200 Subject: Spin: add @world global hash --- lib/iotas/spin.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/iotas/spin.rb b/lib/iotas/spin.rb index 4c8e238..6383ff9 100644 --- a/lib/iotas/spin.rb +++ b/lib/iotas/spin.rb @@ -27,6 +27,7 @@ module Iotas super n, nil # @pool = {} # per particle class free list + @world = {} # global iotas index @sys_fifo = [] # system particles fifo list @app_fifo = [] # application particles fifo list # @@ -70,6 +71,14 @@ module Iotas self.new o['name'], o end # + def add_to_world iota + @world[iota.path] = iota + end + # + def search_world path + @world[path] + end + # def clear! @iotas.clear @pool.clear -- cgit v1.1-2-g2b99