module Mumble::ThreadTools
Protected Instance Methods
kill_threads()
click to toggle source
# File lib/mumble-ruby2/thread_tools.rb, line 15 def kill_threads threads.values.map(&:kill) threads.clear end
spawn_thread(sym)
click to toggle source
# File lib/mumble-ruby2/thread_tools.rb, line 6 def spawn_thread(sym) raise DuplicateThread if threads.has_key? sym threads[sym] = Thread.new { loop { send sym } } end
spawn_threads(*symbols)
click to toggle source
# File lib/mumble-ruby2/thread_tools.rb, line 11 def spawn_threads(*symbols) symbols.map { |sym| spawn_thread sym } end
threads()
click to toggle source
# File lib/mumble-ruby2/thread_tools.rb, line 20 def threads @threads ||= {} end