Class: RBThreadPool::RBThreadDaemon

Inherits:
Object
  • Object
show all
Defined in:
lib/core/rb_daemon.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(mutex, common_pool, elastic, manager, config = {}) ⇒ RBThreadDaemon

Returns a new instance of RBThreadDaemon.



10
11
12
13
14
15
16
17
18
19
# File 'lib/core/rb_daemon.rb', line 10

def initialize(mutex, common_pool, elastic, manager, config = {})
  @mutex = mutex
  @config = config
  @interval = config[:interval] || 20
  @pool = common_pool
  @elastic = elastic
  @manager = manager
  @condition = true
  @daemon_th = nil
end

Instance Attribute Details

#conditionObject

Returns the value of attribute condition.



6
7
8
# File 'lib/core/rb_daemon.rb', line 6

def condition
  @condition
end

#daemon_thObject (readonly)

Returns the value of attribute daemon_th.



8
9
10
# File 'lib/core/rb_daemon.rb', line 8

def daemon_th
  @daemon_th
end

Instance Method Details

#run!Object



21
22
23
# File 'lib/core/rb_daemon.rb', line 21

def run!
  @daemon_th = generate_daemon
end