object CSOThreads
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
- Alphabetic
- By Inheritance
- CSOThreads
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
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
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
val
executor: CSOExecutor
The
CSOExecutor
that is being used in this program.The
CSOExecutor
that is being used in this program. Its kind is fixed bypoolKind
. -
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
getActive: Seq[Thread]
PRE: size of CSO thread pools (or count of CSO threads) is not increasing POST: returns the active CSO threads
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
val
poolKIND: String
Setting a jdk property with
-Dio.threadcso.pool.KIND=
kind what kind of thread pooling to use:Setting a jdk property with
-Dio.threadcso.pool.KIND=
kind what kind of thread pooling to use:- ADAPTIVE -- is the default. Retires idle threads after
poolSECS
. See SizePooledCSOExecutor. - SIZED -- runs several ADAPTIVE pools: each with threads of a similar stack size. See SizePooledCSOExecutor.
- CACHED -- a pool that never retires idle threads.
- UNPOOLED -- makes a new thread every time a
PROC
is run. Stacksize is as specified by thePROC
.
Default is ADAPTIVE
- ADAPTIVE -- is the default. Retires idle threads after
-
val
poolMAX: Int
Setting a jdk property with
-Dio.threadcso.pool.MAX=
number specifies an upper bound on the number of threads to be kept in ADAPTIVE or SIZED pools.Setting a jdk property with
-Dio.threadcso.pool.MAX=
number specifies an upper bound on the number of threads to be kept in ADAPTIVE or SIZED pools. Leave it at its default value unless you have understood the documentation ofThreadPoolExecutor
. -
val
poolMIN: Int
Setting a jdk property with
-Dio.threadcso.pool.MIN=
number specifies a lower bound on the number of threads to be kept in ADAPTIVE or SIZED pools.Setting a jdk property with
-Dio.threadcso.pool.MIN=
number specifies a lower bound on the number of threads to be kept in ADAPTIVE or SIZED pools. Leave it at its default value unless you have understood the documentation ofThreadPoolExecutor
. -
val
poolREPORT: Boolean
Setting a jdk property with
-Dio.threadcso.pool.REPORT=true
causes adaptive pools to report on their activity whenox.CSO.exit
is called, and/or the pool(s) are shut down. -
val
poolSECS: Long
Setting a jdk property with
-Dio.threadcso.pool.SECS=
secs specifies that idling pooled threads expire after secs idling.Setting a jdk property with
-Dio.threadcso.pool.SECS=
secs specifies that idling pooled threads expire after secs idling. Default same aspoolSecs
. -
val
poolSTACKSIZE: Long
Life's too short to construct lovely prose.
Life's too short to construct lovely prose. This is how to recommend the stack sizes of threads made with CACHED or ADAPTIVE pooling. Set the appropriate jdk property/ies with -D<propname>=...
val G = 1024*1024*1024*getPropElse("io.threadcso.pool.G", _.toLong)(0) val M = 1024*1024*getPropElse("io.threadcso.pool.M", _.toLong)(0) val K = 1024*getPropElse("io.threadcso.pool.K", _.toLong)(0) G+M+K
-
val
poolSecs: Long
Setting a jdk property with
-Dio.threadcso.pool=
secs specifies that idling pooled threads expire after secs idling.Setting a jdk property with
-Dio.threadcso.pool=
secs specifies that idling pooled threads expire after secs idling. (deprecated: default 4) -
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )