Packages

object State extends Serializable

Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. State
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. def apply(build: Build, pool: ClientPool, opts: CommonOptions, logger: Logger): State
  2. def loadActiveStateFor(configDir: AbsolutePath, pool: ClientPool, opts: CommonOptions, logger: Logger): State

    Loads an state active for the given configuration directory.

    Loads an state active for the given configuration directory.

    configDir

    The configuration directory to load a state for.

    pool

    The pool of listeners that are connected to this client.

    opts

    The common options associated with the state.

    logger

    The logger to be used to instantiate the state.

    returns

    An state (cached or not) associated with the configuration directory.

  3. def setCores(state: State, threads: Int): State

    Sets up the cores for the execution context to be used for compiling and testing the project.

    Sets up the cores for the execution context to be used for compiling and testing the project.

    The execution context is for now global and it's reused across different states. When the number of threads that can be used is changed by the user, all the states of the builds are affected. This is the most reasonable way to do it since, I believe, having a thread pool per build state can end up being too expensive (this, however, must be tested and benchmarked in order to be truth, and that's left for the future).

    The following implementation relies that the thread pool we get is backed up by the executor in ExecutionContext. If this invariant changes, this implementation must change, as explained in ExecutionContext.

    The implementation of this method is forcibly mutable.

  4. def setUpShutdownHoook(): Unit