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 channel

    This package defines channels that can participate in the CSO alternation constructs.

    This package defines channels that can participate in the CSO alternation constructs.

    I have separated syntax and semantics as far as was practical, given my reluctance to get embroiled with the Scala macro system (it was unstable when the CSO work started)

    An io.threadcso.alternation.Run embodies the state of execution of an alternation.

    The guarded event notation: (guard && port) =...=> { .... } is parsed to a Guarded...Port =...=> ... then to an appropriate class of event. The former is achieved by defining the implicit class io.threadcso.Guarded in the top-level CSO API. This provides the appropriate extension to Boolean.

    @author Bernard Sufrin, Oxford
    $Revision: 240 $
    $Date: 2017-10-13 18:12:11 +0100 (Fri, 13 Oct 2017) $
    Definition Classes
    alternation
  • AltCapableChannel
  • Chan
  • GuardedChan
  • GuardedInPort
  • GuardedOutPort
  • InPort
  • N2N
  • N2NBuf
  • OneOne
  • OneOneBuf
  • OutPort
  • SharedAltCapableChannel

trait InPort[+T] extends channel.InPort[T]

Alt-capable input port

Linear Supertypes
channel.InPort[T], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. InPort
  2. InPort
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def ?[U](f: (T) ⇒ U): U

    Block until a value t is available for input, then return f(t) -- equivalent to f(?()).

    Block until a value t is available for input, then return f(t) -- equivalent to f(?()).

    Definition Classes
    InPort
  2. abstract def ?(): T

    Block until a value is available for input, then read and return it.

    Block until a value is available for input, then read and return it.

    Definition Classes
    InPort
  3. abstract def ??[U](f: (T) ⇒ U): U

    Block until a value t is available for input, then return f(t).

    Block until a value t is available for input, then return f(t). If the inport is provided by a synchronized channel then synchronisation with the termination of the sender's ! is at the termination of the computation of f(t) (this is sometimes called an extended rendezvous).

    Definition Classes
    InPort
  4. abstract def canInput: Boolean

    Returns false if no further input will be supplied by this port.

    Returns false if no further input will be supplied by this port. Returning true is not a guarantee that further input will be supplied.

    Definition Classes
    InPort
  5. abstract def closeIn(): Unit

    Signal that no further attempts will be made to input from the invoking thread: idempotent

    Signal that no further attempts will be made to input from the invoking thread: idempotent

    Definition Classes
    InPort
  6. abstract def inPortState: PortState

    Current state of this port: for alternation implementations

    Current state of this port: for alternation implementations

    Definition Classes
    InPort
  7. abstract def name: String

    Name of the channel this port can read from

    Name of the channel this port can read from

    Definition Classes
    InPort
  8. abstract def readBefore(ns: Long): Option[T]

    Block until the earlier of the following events happens:

    Block until the earlier of the following events happens:

    - 1. A value, t, is available for input.

    - 2. ns nanoseconds have elapsed.

    Return Some(t) in case 1, and None in case 2.

    The longest possible wait that can specified this way is about 146 years.

    Definition Classes
    InPort
  9. abstract def registerIn(alt: Runnable, theIndex: Int): PortState
  10. abstract def unregisterIn(): PortState

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def =?=>(body: (T) ⇒ Unit): InPortEvent[T]

    Construct an unconditional input event for use in an alternation.

  5. def =??=>(body: (T) ⇒ Unit): InPortEventExtended[T]

    Construct an unconditional extended-rendezvous input event for use in an alternation.

  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. def nothing: T

    The null value for this port -- equivalent to null.asInstanceOf[T].

    The null value for this port -- equivalent to null.asInstanceOf[T]. Useful to initialise variables that will in due course be assigned values by reading from the port.

    Definition Classes
    InPort
    Annotations
    @inline()
  16. final def notify(): Unit
    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  18. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  19. def toString(): String
    Definition Classes
    AnyRef → Any
  20. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from channel.InPort[T]

Inherited from AnyRef

Inherited from Any

Ungrouped