Class: ThreadPoolWrapper

Inherits:
Object show all
Defined in:
lib/droiuby/wrappers/thread_pool_wrapper.rb

Instance Method Summary collapse

Constructor Details

#initializeThreadPoolWrapper

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

#nativeObject



7
8
9
# File 'lib/droiuby/wrappers/thread_pool_wrapper.rb', line 7

def native
  @native
end

#startObject



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