ThreadPool

mill.exec.ExecutionContexts.ThreadPool
class ThreadPool(executor: ThreadPoolExecutor) extends Impl

A simple thread-pool-based ExecutionContext with configurable thread count and AutoCloseable support

Attributes

Source
ExecutionContexts.scala
Graph
Supertypes
trait Impl
trait AutoCloseable
trait ExecutionContext
trait Api
class Object
trait Matchable
class Any
Show all

Members list

Type members

Classlikes

class PriorityRunnable(val priority: Int, run0: () => Unit) extends Runnable, Comparable[PriorityRunnable]

Subclass of java.lang.Runnable that assigns a priority to execute it

Subclass of java.lang.Runnable that assigns a priority to execute it

Priority 0 is the default priority of all Mill task, priorities <0 can be used to prioritize this runnable over most other tasks, while priorities >0 can be used to de-prioritize it.

Attributes

Source
ExecutionContexts.scala
Supertypes
trait Comparable[ThreadPool.this.PriorityRunnable]
trait Runnable
class Object
trait Matchable
class Any

Value members

Concrete methods

def async[T](dest: Path, key: String, message: String, priority: Int)(t: Logger => T)(using ctx: TaskCtx): Future[T]

A variant of scala.concurrent.Future{...} that sets the pwd to a different folder dest and duplicates the logging streams to dest.log while evaluating t, to avoid conflict with other tasks that may be running concurrently

A variant of scala.concurrent.Future{...} that sets the pwd to a different folder dest and duplicates the logging streams to dest.log while evaluating t, to avoid conflict with other tasks that may be running concurrently

Attributes

Source
ExecutionContexts.scala
def await[T](t: Future[T]): T

Awaits for the result for the given async future and returns the resultant value

Awaits for the result for the given async future and returns the resultant value

Attributes

Source
ExecutionContexts.scala
def blocking[T](t: => T): T

Attributes

Source
ExecutionContexts.scala
def close(): Unit

Attributes

Source
ExecutionContexts.scala
def execute(runnable: Runnable): Unit

Attributes

Source
ExecutionContexts.scala
def reportFailure(t: Throwable): Unit

Attributes

Source
ExecutionContexts.scala
def updateThreadCount(delta: Int): Unit

Attributes

Source
ExecutionContexts.scala

Inherited methods

def awaitAll[T](t: Seq[Future[T]]): Seq[T]

Awaits for the result for multiple async futures and returns the resultant values

Awaits for the result for multiple async futures and returns the resultant values

Attributes

Inherited from:
Impl
Source
TaskCtx.scala

Deprecated and Inherited methods

def prepare(): ExecutionContext

Attributes

Deprecated
[Since version 2.12.0] preparation of ExecutionContexts will be removed
Inherited from:
ExecutionContext

Concrete fields

val priorityRunnableCount: AtomicLong

Attributes

Source
ExecutionContexts.scala