Class: FootTraffic::ThreadPool

Inherits:
Object
  • Object
show all
Defined in:
lib/foot_traffic/session.rb

Instance Method Summary collapse

Constructor Details

#initializeThreadPool

Returns a new instance of ThreadPool.



6
7
8
# File 'lib/foot_traffic/session.rb', line 6

def initialize
  @threads = []
end

Instance Method Details

#<<(thread) ⇒ Object



10
11
12
# File 'lib/foot_traffic/session.rb', line 10

def <<(thread)
  @threads << thread
end

#waitObject



14
15
16
# File 'lib/foot_traffic/session.rb', line 14

def wait
  @threads.map(&:join)
end