Method: LightIO::Core::IOloop.current

Defined in:
lib/lightio/core/ioloop.rb

.currentObject

return current ioloop or create new one



57
58
59
60
61
62
63
# File 'lib/lightio/core/ioloop.rb', line 57

def current
  key = :"lightio.ioloop"
  unless Thread.current.thread_variable?(key)
    Thread.current.thread_variable_set(key, IOloop.new)
  end
  Thread.current.thread_variable_get(key)
end