scala.concurrent.pilib
class Chan

[source: `scala/concurrent/pilib.scala`]

`` `class` Chan[a]
  `extends` UChan `with` (a) => Product[a]

  Name on which one can emit, receive or that can be emitted or received during a communication.

Value Summary
`var` | defaultValue : a

Values and Variables inherited from UChan
log

Method Summary
`def` | * [b](f : (a) => b) : GP[b] Syntactic sugar for input.
`def` | apply (v : a) : Product[a] Syntactic sugar for output.
`def` | attach (f : (a) => Unit) : Unit Attach a function to be evaluated at each communication event on this channel. Replace previous attached function.
`def` | input [b](c : (a) => b) : GP[b] Creates an input guarded process.
`def` | output [b](v : a, c : () => b) : GP[b] Creates an input guarded process.
`def` | read : a Blocking read.
`def` | write (x : a) : Unit Blocking write.

Methods inherited from Function1
toString, compose, andThen

Methods inherited from AnyRef
getClass, hashCode, equals, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized

Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf

Value Details

`` `var` defaultValue : a

Method Details

`` `def` input[b](c : (a) => b) : GP[b]

  Creates an input guarded process.

`` `def` output[b](v : a, c : () => b) : GP[b]

  Creates an input guarded process.

`` `def` read : a

  Blocking read.

`` `def` write(x : a) : Unit

  Blocking write.

`` `def` *[b](f : (a) => b) : GP[b]

  Syntactic sugar for input.

`` `def` apply(v : a) : Product[a]

  Syntactic sugar for output.

Overrides
  Function1.apply

`` `def` attach(f : (a) => Unit) : Unit

  Attach a function to be evaluated at each communication event on this channel. Replace previous attached function.