final class ConcurrentTasks[T] extends Tasks[T]
Executes the given function process
for each submitted value of type T
.
The process
function can add further values that should be processed.
- Self Type
- ConcurrentTasks[T]
- Source
- Tasks.scala
val tasks = Tasks[T] { (tasks : Tasks[T], t : T) => // do something with t if (<some condition>) { tasks.submit(nextT) } } val exceptions = tasks.join()
- Alphabetic
- By Inheritance
- ConcurrentTasks
- Tasks
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new ConcurrentTasks(process: (Tasks[T], T) => Unit, abortOnExceptions: Boolean = false, isInterrupted: () => Boolean = () => Thread.currentThread().isInterrupted())(implicit executionContext: ExecutionContext)
- process
A function that is given a value of type
T
and this instance ofTasks
.Tasks
can be used to submit further values of typeT
.
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def abortDueToExternalException(exception: Throwable): Unit
- Definition Classes
- ConcurrentTasks → Tasks
- val abortOnExceptions: Boolean
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- def currentExceptions: ConcurrentExceptions
- Definition Classes
- ConcurrentTasks → Tasks
- def currentTasksCount: Int
Returns the current tasks count; primarily intended to be used for debugging purposes!
Returns the current tasks count; primarily intended to be used for debugging purposes!
- Definition Classes
- ConcurrentTasks → Tasks
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- implicit val executionContext: ExecutionContext
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hasExceptions: Boolean
- Definition Classes
- ConcurrentTasks → Tasks
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def join(): Unit
Blocks the calling thread until all submitted tasks as well as those tasks that are created while processing tasks have been processed.
Blocks the calling thread until all submitted tasks as well as those tasks that are created while processing tasks have been processed.
join
must not be called by a thread that actually executes a task!- Definition Classes
- ConcurrentTasks → Tasks
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- val process: (Tasks[T], T) => Unit
- def submit(t: T): Unit
- Definition Classes
- ConcurrentTasks → Tasks
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated