module XRBP::ThreadRegistry

Helper mixin providing internal thread management.

@private

Public Instance Methods

rsleep(t) click to toggle source
# File lib/xrbp/thread_registry.rb, line 12
def rsleep(t)
  thread_registry << Thread.current
  sleep(t)
  thread_registry.delete(Thread.current)
end
thread_registry() click to toggle source
# File lib/xrbp/thread_registry.rb, line 8
def thread_registry
  @thread_registry ||= Concurrent::Array.new
end
wake_all() click to toggle source
# File lib/xrbp/thread_registry.rb, line 18
def wake_all
  thread_registry.each { |th| th.wakeup }
end