class Concurrent::DaemonThreadFactory

def initialize(daemonize = true)

def initialize(daemonize = true)
  @daemonize = daemonize
end

def newThread(runnable)

def newThread(runnable)
  thread = java.util.concurrent.Executors.defaultThreadFactory().newThread(runnable)
  thread.setDaemon(@daemonize)
  return thread
end