summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-05-24 22:52:04 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2012-05-24 22:52:04 +0200
commita3b20c77f2d6496362806ddc3886f42d76298625 (patch)
treea2dedcb6603dcbfa1598dc82712ab2eb59edcb9b /lib
parent5cbba1e08eed97a5157747e769d80f1fc1b9d675 (diff)
downloadedoors-ruby-a3b20c77f2d6496362806ddc3886f42d76298625.zip
edoors-ruby-a3b20c77f2d6496362806ddc3886f42d76298625.tar.gz
Spin: add @world global hash
Diffstat (limited to 'lib')
-rw-r--r--lib/iotas/spin.rb9
1 files changed, 9 insertions, 0 deletions
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