ConcurrentRestrictions

sbt.ConcurrentRestrictions
See theConcurrentRestrictions companion trait

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

final case class Tag(name: String)

A key object used for associating information with a task.

A key object used for associating information with a task.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Types

type TagMap = Map[Tag, Int]

Value members

Concrete methods

def cancelAll(): Unit
def cancellableCompletionService(tags: ConcurrentRestrictions, warn: String => Unit, isSentinel: TaskId[_] => Boolean): (CompletionService, Boolean => Unit)
def completionService(tags: ConcurrentRestrictions, warn: String => Unit): (CompletionService, () => Unit)

Constructs a CompletionService suitable for backing task execution based on the provided restrictions on concurrent task execution.

Constructs a CompletionService suitable for backing task execution based on the provided restrictions on concurrent task execution.

Type parameters

A

the task type

R

the type of data that will be computed by the CompletionService.

Attributes

Returns

a pair, with _1 being the CompletionService and _2 a function to shutdown the service.

def completionService(tags: ConcurrentRestrictions, warn: String => Unit, isSentinel: TaskId[_] => Boolean): (CompletionService, () => Unit)
def completionService(backing: Executor, tags: ConcurrentRestrictions, warn: String => Unit): CompletionService & AutoCloseable
def completionService(backing: Executor, tags: ConcurrentRestrictions, warn: String => Unit, isSentinel: TaskId[_] => Boolean): CompletionService & CancelSentiels & AutoCloseable

Constructs a CompletionService suitable for backing task execution based on the provided restrictions on concurrent task execution and using the provided Executor to manage execution on threads.

Constructs a CompletionService suitable for backing task execution based on the provided restrictions on concurrent task execution and using the provided Executor to manage execution on threads.

Attributes

def tagged(validF: TagMap => Boolean): ConcurrentRestrictions

Implements concurrency restrictions on tasks based on Tags.

Implements concurrency restrictions on tasks based on Tags.

Value parameters

get

extracts tags from a task

validF

defines whether a set of tasks are allowed to execute concurrently based on their merged tags

Attributes

A ConcurrentRestrictions instance that places no restrictions on concurrently executing tasks.

A ConcurrentRestrictions instance that places no restrictions on concurrently executing tasks.

Attributes

Concrete fields

val All: Tag

A standard tag describing the total number of tasks.

A standard tag describing the total number of tasks.

Attributes

val TagMap: Map[Tag, Int]
val Untagged: Tag

A standard tag describing the number of tasks that do not otherwise have any tags.

A standard tag describing the number of tasks that do not otherwise have any tags.

Attributes

val tagsKey: AttributeKey[TagMap]