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

org.gerweck.scala.util.io.package.scala Maven / Gradle / Ivy

The newest version!
package org.gerweck.scala.util

import scala.concurrent.ExecutionContext
import java.util.concurrent.Executors

/**
  *
  * @author Sarah Gerweck 
  */
package object io {
  private[this] final val streamThreadPrefix = "scala-utils-iothread-"
  private[this] final val ioThreadPriority = Thread.NORM_PRIORITY - 1
  lazy val ioExecutorContext = {
    val threadFactory = {
      ThreadFactories({streamThreadPrefix + (_: Int)}, daemon = true, priority = ioThreadPriority)
    }
    ExecutionContext.fromExecutor(Executors.newCachedThreadPool(threadFactory))
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy