Runnable protocol

Defines a protocol for starting a sequence of events. The basic idea is that only after calling run the sending of events starts, at least for “cold” observables, which need to be started explicitely.

There are usually two basic modes of implementing run:

  • do some side effect for producing events, e.g. fork a new process sending events. This is the usual implementation for sources of an event sequence
  • in an inbetween node, you will simply call run on your sources

Some the Rx functions will call run to start immedietely the event sequence. In particular functions like to_list or stream do it inside their implementation.

Where do we need an implementation of Runnable?

  • Observables need to implement Runnable such that we can start them from the outside on request.
  • The source connection between two Observables (i.e. Rx_Impl for now) needs to contain a Runnable as first component.
Source

Summary

run(runnable)

Run start an event sequence. It returns its input parameters

Types

t :: term

Functions

run(runnable)

Specs:

Run start an event sequence. It returns its input parameters

Source