Module: Infrastruct
- Defined in:
- lib/infrastruct.rb,
lib/infrastruct/manager.rb,
lib/infrastruct/version.rb,
lib/infrastruct/thread_pool.rb,
lib/infrastruct/nonblocking_queue.rb
Defined Under Namespace
Classes: Manager, NonblockingQueue, ThreadPool
Constant Summary
collapse
- VERSION =
'0.1.0'
Instance Method Summary
collapse
Instance Method Details
#create ⇒ Object
8
9
10
11
12
|
# File 'lib/infrastruct.rb', line 8
def create
pool = Infrastruct::ThreadPool.new(threads: options[:threads])
Manager.new(self, thread_pool: pool)
end
|
#options(options = {}) ⇒ Object
14
15
16
17
18
19
20
|
# File 'lib/infrastruct.rb', line 14
def options(options = {})
@options ||= { threads: 5 }
@options.merge(options)
@options
end
|