Copyright © 2015-2018 Jörgen Brandt
Version: 0.1.4
Authors: Jörgen Brandt (joergen.brandt@onlinehome.de).
A module implementing the behavior of the common runtime environment (CRE).
add_worker/2 | Registers a worker process with a given CRE instance. |
code_change/3 | |
cre_request/4 | Requests the computation of an application from a given CRE intance. |
handle_call/3 | |
handle_cast/2 | |
handle_info/2 | |
init/1 | |
start_link/0 | Starts an anonymous CRE instance. |
start_link/1 | Starts a named CRE instance. |
stop/1 | Stops the CRE instance. |
terminate/2 | |
worker_result/4 | Sends the result of a previously computed application to the CRE. |
add_worker(CreName, WorkerName) -> any()
Registers a worker process with a given CRE instance.
Takes the name of a CRE instanceCreName
and the name of a worker
instance WorkerName
and adds the worker to the worker pool of the CRE.
The presence of workers is a precondition for the CRE to send out demand
or perform work. A CRE without workers, thus, can accept clients but can
never make progress.
code_change(OldVsn, CreState, Extra) -> any()
cre_request(CreName, ClientName, I, A) -> any()
Requests the computation of an application from a given CRE intance.
When a client with the nameClientName
that has received demand has
generated an application A
belonging to a program with the program
identifier I
it uses this function to send the application to the CRE
instance with the name CreName
.
handle_call(Request, From, CreState) -> any()
handle_cast(Request, CreState) -> any()
handle_info(Info, CreState) -> any()
init(Arg) -> any()
start_link() -> any()
Starts an anonymous CRE instance.
Returns{ok, Pid}
on success where Pid
is the process id of the
newly created process.
See also: start_link/1.
start_link(CreName) -> any()
Starts a named CRE instance.
Returns{ok, Pid}
on success where Pid
is the process id of the
newly created process.
See also: start_link/0.
stop(CreName) -> any()
Stops the CRE instance.
terminate(Reason, CreState) -> any()
worker_result(CreName, WorkerName, A, Delta) -> any()
Sends the result of a previously computed application to the CRE.
When a worker has computed the result of an application that has previously been requested from it the worker sends the result back to the CRE using this function.Generated by EDoc