Class: JFuture::DaemonThreadFactory

Inherits:
Object
  • Object
show all
Includes:
Java::JavaUtilConcurrent::ThreadFactory
Defined in:
lib/j_future/daemon_thread_factory.rb

Instance Method Summary collapse

Instance Method Details

#newThread(runnable) ⇒ Object



4
5
6
7
8
# File 'lib/j_future/daemon_thread_factory.rb', line 4

def newThread(runnable)
  thread = Java::JavaUtilConcurrent::Executors.defaultThreadFactory().newThread(runnable)
  thread.setDaemon(true)
  thread
end