| Class | Spring |
| In: |
lib/spring.rb
|
| Parent: | Object |
| GET | = | :get |
| SIGN_UP | = | :sign_up |
# File lib/spring.rb, line 20 def initialize(*items) @q = *items @mutex = Mutex.new @collecter = [] end
# File lib/spring.rb, line 26 def get(collecter_id) @mutex.synchronize do if @collecter.include?(collecter_id) item = @q.shift changed(true) notify_observers(self.object_id, GET, collecter_id) return item end end end