Class: RBThreadPool::RBThreadDaemon
- Inherits:
-
Object
- Object
- RBThreadPool::RBThreadDaemon
- Defined in:
- lib/core/rb_daemon.rb
Instance Attribute Summary collapse
-
#condition ⇒ Object
Returns the value of attribute condition.
-
#daemon_th ⇒ Object
readonly
Returns the value of attribute daemon_th.
Instance Method Summary collapse
-
#initialize(mutex, common_pool, elastic, manager, config = {}) ⇒ RBThreadDaemon
constructor
A new instance of RBThreadDaemon.
- #run! ⇒ Object
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
#condition ⇒ Object
Returns the value of attribute condition.
6 7 8 |
# File 'lib/core/rb_daemon.rb', line 6 def condition @condition end |
#daemon_th ⇒ Object (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 |