package process
- Alphabetic
- Public
- All
Type Members
-
trait
CSOExecutor
extends AnyRef
A
CSOExecutor
is the means by which (possibly-pooled) threads are allocated to theRunnable
s that correspond toCSO
processes in order to run them.A
CSOExecutor
is the means by which (possibly-pooled) threads are allocated to theRunnable
s that correspond toCSO
processes in order to run them. It is an abstraction of some sort of execution service. -
trait
PROC
extends () ⇒ Unit
A
PROC
is a prototype for a process that can be started and run.A
PROC
is a prototype for a process that can be started and run. In Threaded CSO aPROC
is started by acquiring a thread (usually from a thread pool). In Fibred CSOPROC
is started by acquiring a fibre from the runtime system. -
class
ParSyntax
extends PROC
Syntactic composition of
PROC
s.Syntactic composition of
PROC
s.Evaluating an expression of the form
p
1||
p
2|| ... ||
p
nyields a
ParSyntax(List(
p
n, ...,
p
1))
This is done because
||
is parsed left-associatively by Scala, and it's more efficient to cons its right argument to the the front of the accumulated list than it is to append it at the end.The computation of its meaning is deferred until (the first time) it is run (by forking or applying).
At this point the process list is reversed and compiled just in time by being embedded in a
Par
. The reversal is not semantically necessary, but it helps to make a subsequentParException
more intelligible. More importantly, it is consistent with the way in which a prefix||
constructs itsPar
. -
class
PooledCSOExecutor
extends CSOExecutor
The simplest form of
CSOExecutor
just wraps ajava.util.concurrent.ExecutorService
. -
class
SizePooledCSOExecutor
extends CSOExecutor
A form of
CSOExecutor
that can retire unused pooled threads, organized as a collection of pools of threads with similar stack-sizes.A form of
CSOExecutor
that can retire unused pooled threads, organized as a collection of pools of threads with similar stack-sizes. Apart from the default pool, pools are not activated until a process requesting a size of stack that falls within the range of that pool is started. The boundaries of the ranges are at:256, 1024, 4096, 16384, 65536
. Processes specifying stack sizes outside those ranges (or leaving stacksize unspecified) are allocated from the default pool. -
class
Stopped
extends Throwable
A process throws a
Stopped
or one of its subclassThrowables
to signify normal termination. -
class
ThreadPooledCSOExecutor
extends CSOExecutor
A form of
CSOExecutor
that can retire unused pooled threads.A form of
CSOExecutor
that can retire unused pooled threads. Ifreport
is true, then a brief report to be made to the console when the pool shuts down (usually when the CSO program finishes). The report details the current and the largest size of the pool, the number of processes executed.
Value Members
-
object
CSOThreads
This is the module in which the characteristics of the pooling of threads used by threaded-
CSO
are determined.This is the module in which the characteristics of the pooling of threads used by threaded-
CSO
are determined.To be specific, the following jdk runtime properties determine thread-pooling characteristics, and can be set either from a program that uses CSO (before any CSO process construct is executed) or (as we usually expect) by setting the appropriate jdk property from the (usually scala) command line that runs the program.
io.threadcso.pool.SECS
the time before pooled threads are deemed idle (ADAPTIVE and SIZED pools only). See CSOThreads.poolSECSio.threadcso.pool.KIND
the kind of the pool: ADAPTIVE, SIZED, CACHED, UNPOOLED. See CSOThreads.poolKINDio.threadcso.pool.REPORT
report pool performance on program exit. See CSOThreads.poolREPORT
The following runtime properties have specialized interpretations.
io.threadcso.pool.G + io.threadcso.pool.M + io.threadcso.pool.K
specifies default stacksize for non-SIZED pools. See CSOThreads.poolSTACKSIZE- io.threadcso.pool.MAX See CSOThreads.poolMAX
- io.threadcso.pool.MIN See CSOThreads.poolMIN
- object Process