Class: ThreadPoolWrapper
- Defined in:
- lib/droiuby/wrappers/thread_pool_wrapper.rb
Instance Method Summary collapse
-
#initialize ⇒ ThreadPoolWrapper
constructor
A new instance of ThreadPoolWrapper.
- #native ⇒ Object
- #start ⇒ Object
- #task(&block) ⇒ Object
Constructor Details
#initialize ⇒ ThreadPoolWrapper
Returns a new instance of ThreadPoolWrapper.
3 4 5 |
# File 'lib/droiuby/wrappers/thread_pool_wrapper.rb', line 3 def initialize @native = com.droiuby.client.core.wrappers.ThreadPoolWorkerWrapper.new end |
Instance Method Details
#native ⇒ Object
7 8 9 |
# File 'lib/droiuby/wrappers/thread_pool_wrapper.rb', line 7 def native @native end |
#start ⇒ Object
15 16 17 |
# File 'lib/droiuby/wrappers/thread_pool_wrapper.rb', line 15 def start @native.start end |
#task(&block) ⇒ Object
11 12 13 |
# File 'lib/droiuby/wrappers/thread_pool_wrapper.rb', line 11 def task(&block) @native.addTask(Java::com.droiuby.client.core.wrappers.ThreadWrapper.new(block, _execution_bundle)) end |