Packages

  • package root
    Definition Classes
    root
  • package io

    This is the documentation for the ThreadCSO Library.

    This is the documentation for the ThreadCSO Library. Notable packages include:

    Definition Classes
    root
  • package threadcso

    The standard threadCSO API.

    The standard threadCSO API. Most modules using CSO will need only the declaration:

    import io.threadcso._

    The present version of the ThreadCSO library API is 1.2Rr (for some number r)

    The revision number (Rr) will change if bugs are corrected but the code remains consistent with the previous API. Its minor version number will change if there is a correction to the code that breaks consistency with the previous API. Its major version will change if there is a substantial change in the semantics of an important CSO construct.

    August 2017: changes 1.1 => 1.2

    • renaming of very many internal classes and packages
    • basic channel implementations are more efficient, in some case much more so
    • alternation reliability improved
    • debugger registration of alternations is no longer needed
    • home-grown semaphores can specify which component they are part of: this makes interpreting a stack backtrace very much easier
    • there is a flexible logging system that is compatible with the debugger

    April 2016: changes 1.0 => 1.1

    • Extended rendezvous read operator is now ?? (was ?)
    • Extended rendezvous read event notation is now =??=> (was =?=>>)
    • The notation inport ? f is now equivalent to f(inport?()) This makes for a tidier layout when the function f is an explicit functional expression.

    Feb 1 2017: changes 1.1R1 => 1.1R2

    • Removed dependencies on deprecated Java->Scala functions: replaced with .asJava
    @author Bernard Sufrin, Oxford
    $Revision: 286 $
    $Date: 2017-11-18 17:41:30 +0000 (Sat, 18 Nov 2017) $
    Definition Classes
    io
  • package alternation
    Definition Classes
    threadcso
  • package basis

    A home for types that are needed more or less pervasively.

    A home for types that are needed more or less pervasively.

    @author Bernard Sufrin, Oxford
    $Revision: 228 $
    $Date: 2016-03-04 16:11:56 +0000 (Fri, 04 Mar 2016)
    Definition Classes
    threadcso
  • package channel

    Specifies primitive (non-alternation-capable) ports and channels; and implements several channel types.

    Specifies primitive (non-alternation-capable) ports and channels; and implements several channel types.

    Definition Classes
    threadcso
  • package component

    A collection of several process-generators that (mostly) yield processes to work on (or produce) finite or infinite streams of values presented as channel.

    A collection of several process-generators that (mostly) yield processes to work on (or produce) finite or infinite streams of values presented as channel. All are designed to terminate cleanly -- 'i.e.' to closeIn or closeOut all the channel.that they communicate on in the appropriate direction for the type of port.

    Some of these components were inspired by (or copied from) components from the Plug'n'Play collection of JCSP (without necessarily retaining the P'n'P names).

    @version 03.20120824
    @author Bernard Sufrin, Oxford
    $Revision: 247 $
    $Date: 2017-10-20 15:00:00 +0100 (Fri, 20 Oct 2017) $
    Definition Classes
    threadcso
  • package debug
    Definition Classes
    threadcso
  • package lock
    Definition Classes
    threadcso
  • package monitor
    Definition Classes
    threadcso
  • package process
    Definition Classes
    threadcso
  • CSOExecutor
  • CSOThreads
  • PROC
  • ParSyntax
  • PooledCSOExecutor
  • Process
  • SizePooledCSOExecutor
  • Stopped
  • ThreadPooledCSOExecutor
  • package semaphore
    Definition Classes
    threadcso
p

io.threadcso

process

package process

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. All

Type Members

  1. trait CSOExecutor extends AnyRef

    A CSOExecutor is the means by which (possibly-pooled) threads are allocated to the Runnables that correspond to CSO processes in order to run them.

    A CSOExecutor is the means by which (possibly-pooled) threads are allocated to the Runnables that correspond to CSO processes in order to run them. It is an abstraction of some sort of execution service.

  2. 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 a PROC is started by acquiring a thread (usually from a thread pool). In Fibred CSO PROC is started by acquiring a fibre from the runtime system.

  3. class ParSyntax extends PROC

    Syntactic composition of PROCs.

    Syntactic composition of PROCs.

    Evaluating an expression of the form

    p1 || p2 || ... || pn

    yields a

    ParSyntax(List(pn, ..., p1))

    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 subsequent ParException more intelligible. More importantly, it is consistent with the way in which a prefix || constructs its Par.

  4. class PooledCSOExecutor extends CSOExecutor

    The simplest form of CSOExecutor just wraps a java.util.concurrent.ExecutorService.

  5. 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.

  6. class Stopped extends Throwable

    A process throws a Stopped or one of its subclass Throwables to signify normal termination.

  7. class ThreadPooledCSOExecutor extends CSOExecutor

    A form of CSOExecutor that can retire unused pooled threads.

    A form of CSOExecutor that can retire unused pooled threads. If report 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

  1. 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.poolSECS
    • io.threadcso.pool.KIND the kind of the pool: ADAPTIVE, SIZED, CACHED, UNPOOLED. See CSOThreads.poolKIND
    • io.threadcso.pool.REPORT report pool performance on program exit. See CSOThreads.poolREPORT

    The following runtime properties have specialized interpretations.

  2. object Process

Ungrouped