ThreadPool
A simple thread-pool-based ExecutionContext with configurable thread count and AutoCloseable support
Attributes
- Source
- ExecutionContexts.scala
- Graph
-
- Supertypes
Members list
Type members
Classlikes
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 Runnableclass Objecttrait Matchableclass Any
Value members
Concrete methods
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
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
Attributes
- Source
- ExecutionContexts.scala
Attributes
- Source
- ExecutionContexts.scala
Runs a block of code on this execution context.
Runs a block of code on this execution context.
Value parameters
- runnable
-
the task to execute
Attributes
- Source
- ExecutionContexts.scala
Reports that an asynchronous computation failed.
Reports that an asynchronous computation failed.
Value parameters
- cause
-
the cause of the failure
Attributes
- Source
- ExecutionContexts.scala
Attributes
- Source
- ExecutionContexts.scala
Inherited methods
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
Prepares for the execution of a task. Returns the prepared execution context. The recommended implementation of prepare is to return this.
Prepares for the execution of a task. Returns the prepared execution context. The recommended implementation of prepare is to return this.
This method should no longer be overridden or called. It was originally expected that prepare would be called by all libraries that consume ExecutionContexts, in order to capture thread local context. However, this usage has proven difficult to implement in practice and instead it is now better to avoid using prepare entirely.
Instead, if an ExecutionContext needs to capture thread local context, it should capture that context when it is constructed, so that it doesn't need any additional preparation later.
Attributes
- Deprecated
-
[Since version 2.12.0]preparation of ExecutionContexts will be removed - Inherited from:
- ExecutionContext
- Source
- ExecutionContext.scala
Concrete fields
Attributes
- Source
- ExecutionContexts.scala