molecule.channel

RIChan

object RIChan extends AnyRef

Factory methods for RIChan and extra DSL support like callcc and parl (see ChameneosRedux example in molecule-core-examples).

Source
RChan.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. RIChan
  2. AnyRef
  3. Any
Visibility
  1. Public
  2. All

Type Members

  1. class RIChanWithFuture[A] extends AnyRef

    Class that enriches a RIChan with a future methods.

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def async[A](executor: Executor)(task: ⇒ A)(implicit arg0: Message[A]): RIChan[A]

    Create a result channel that returns the result of an asynchronous task that is scheduled immediately for execution.

    Create a result channel that returns the result of an asynchronous task that is scheduled immediately for execution.

    Note: the executor that executes the task can be released immediately once the result becomes available, independently from the transformations applied to the result, by calling dispathTo immediately after this channel is created.

    A

    the type of the message created by the task.

    executor

    the executor that executes the task and produces a result.

    task

    the task that is executed asynchronously by the executor.

    returns

    a result channel that produces the result of the task

  8. def callcc[A](call: ((A) ⇒ RIChan[Nothing]) ⇒ RIChan[Nothing])(implicit arg0: Message[A]): RIChan[A]

    Call with current continuation.

    Call with current continuation.

    call

    a function that takes the current continuation as argument.

    returns

    a result channel that returns the parameter passed to call.

  9. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  10. implicit def enrichRIChanWithFuture[A](richan: RIChan[A])(implicit arg0: Message[A]): RIChanWithFuture[A]

    Enrich a RIChan with future method.

  11. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  13. def failure(signal: Signal): RIChan[Nothing]

    Create a result channel that fails with a signal.

    Create a result channel that fails with a signal.

    returns

    a result channel that produces the message a

  14. def finalize(): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  15. final def getClass(): java.lang.Class[_]

    Definition Classes
    AnyRef → Any
  16. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  17. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  18. def lazyAsync[A](executor: Executor)(task: ⇒ A)(implicit arg0: Message[A]): RIChan[A]

    Create a result channel that returns the result of an asynchronous task that is scheduled only when some process attempts to consume the result.

    Create a result channel that returns the result of an asynchronous task that is scheduled only when some process attempts to consume the result.

    Note: the executor that executes the task can be released immediately once the result becomes available, independently from the transformations applied to the result, by calling dispathTo immediately after this channel is created.

    A

    the type of the message created by the task.

    executor

    the executor that executes the task and produces a result.

    task

    the task that is executed asynchronously by the executor.

    returns

    a result channel that produces the result of the task

  19. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  20. final def notify(): Unit

    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  22. def parl[A, That <: Traversable[A]](ris: Iterable[RIChan[A]])(implicit ma: Message[A], bf: CanBuildFrom[Nothing, A, That]): RIChan[That]

    Consume the results of a list of result channels in parallel and return them as a list.

    Consume the results of a list of result channels in parallel and return them as a list. If one result channel fails, all the other results are poisoned and a single signal corresponding to the exception is raised.

    ris

    a list of result channels.

    returns

    the list of results. Results occur in the same as the order as the channels that produced them.

  23. def success[A](a: A)(implicit arg0: Message[A]): RIChan[A]

    Create a result channel that returns a message immediately.

    Create a result channel that returns a message immediately.

    A

    the type of the message.

    a

    the message returned by the channel.

    returns

    a result channel that produces the message a

  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  25. def toString(): String

    Definition Classes
    AnyRef → Any
  26. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  27. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  28. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from AnyRef

Inherited from Any