All Downloads are FREE. Search and download functionalities are using the official Maven repository.

turbolift.internals.executor.Scheduler.scala Maven / Gradle / Ivy

The newest version!
package turbolift.internals.executor
import java.util.concurrent.{Executors, ThreadFactory}


private[internals] object Scheduler:
  val instance = Executors.newSingleThreadScheduledExecutor(makeThreadFactory).nn

  private def makeThreadFactory: ThreadFactory =
    new ThreadFactory:
      override def newThread(runnable: Runnable): Thread =
        val thread = new Thread(runnable)
        thread.setName("turbolift-scheduler")
        thread.setDaemon(true)
        thread.setPriority(Thread.MAX_PRIORITY)
        thread




© 2015 - 2024 Weber Informatics LLC | Privacy Policy