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 semaphore
    Definition Classes
    threadcso
  • package jdk
    Definition Classes
    semaphore
  • BooleanSemaphore
  • CountingSemaphore

package jdk

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. All

Type Members

  1. class BooleanSemaphore extends CountingSemaphore

    A classical boolean semaphore that manages a single virtual permit.

    A classical boolean semaphore that manages a single virtual permit. Each acquire waits if necessary until the permit is available, and then makes it unavailable (its "owner" is said to be the process that last made it unavailable). A release makes the permit available (if it wasn't already) to a waiting process.

    If the semaphore is fair the semaphore will (under contention) guarantee first-in first-out acquisition of the permit. Fairness can impose very considerable delays.

    A thread that releases the permit need not have acquired it previously.

    This implementation delegates most of its implementation to java.util.concurrent.Semaphore.

    A BooleanSemaphore can be registered with the debugger.

    Deprecated

    Use io.threadcso.semaphore.CountingSemaphore instead unless you absolutely need the fairness parameter.

  2. class CountingSemaphore extends debug.REGISTRY.Debuggable with Semaphore

    A counting semaphore which maintains a virtual/conceptual set of permits.

    A counting semaphore which maintains a virtual/conceptual set of permits. Each acquire waits if necessary until a permit is available, and then removes it from the set. Each release adds a permit, potentially causing a waiting acquire to return.

    If the semaphore is fair the semaphore will (under contention) guarantee first-in first-out acquisition of permits (by default it is not fair). Fairness can impose considerable delays.

    No actual permit objects are involved; the semaphore just keeps a count of the number available, which may initially be negative.

    A thread that releases a permit need not have acquired one previously.

    This implementation delegates to java.util.concurrent.Semaphore.

    A CountingSemaphore can be registered with the debugger.

    Deprecated

    Use io.threadcso.semaphore.CountingSemaphore instead unless you absolutely need the fairness parameter.

Ungrouped