tagion.actor.actor

Actor framework iplementation Examles: tagion.testbench.services

Members

Aliases

CtrlMsg
alias CtrlMsg = Tuple!(string, "task_name", Ctrl, "ctrl")

Control message sent to a supervisor contains the Tid of the actor which send it and the state

Enums

Ctrl
enum Ctrl
Undocumented in source.
Sig
enum Sig
Undocumented in source.

Functions

_spawn
ActorHandle _spawn(string name, Args args)
Undocumented in source. Be warned that the author may not have intended to support it.
control
void control(CtrlMsg msg)

Controls message sent from the children.

end
void end()

Cleanup and notify the supervisor that you have ended

fail
void fail(Throwable t)

* Send a TaskFailure up to the owner * Silently fails if there is no owner * Does NOT exit regular control flow

ownerTerminated
void ownerTerminated(OwnerTerminated )

Stops the actor if the supervisor stops

run
void run(Args args)
Undocumented in source. Be warned that the author may not have intended to support it.
runTimeout
void runTimeout(Duration duration, void delegate() @(safe) timeout, Args args)
sendOwner
void sendOwner(T vals)

Send to the owner if there is one

setState
void setState(Ctrl ctrl)

send your state to your owner

signal
void signal(Sig signal)
Undocumented in source. Be warned that the author may not have intended to support it.
spawn
ActorHandle spawn(immutable(A) actor, string name, Args args)
Undocumented in source. Be warned that the author may not have intended to support it.
spawn
ActorHandle spawn(string name, Args args)
Undocumented in source. Be warned that the author may not have intended to support it.
statusChildren
bool statusChildren(Ctrl ctrl)
Undocumented in source. Be warned that the author may not have intended to support it.
tidOwner
Nullable!Tid tidOwner()

Nullable and nothrow wrapper around ownerTid

unknown
void unknown(Variant message)

The default message handler, if it's an unknown messages it will send a FAIL to the owner.

waitforChildren
bool waitforChildren(Ctrl state, Duration timeout)
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

taskfailure
Topic taskfailure;
Undocumented in source.
thisActor
ActorInfo thisActor;
Undocumented in source.

Structs

ActorHandle
struct ActorHandle

A "reference" to an actor that may or may not be spawned, we will never know

Msg
struct Msg(string name)

Message "Atom" type

Request
struct Request(string name, ID = uint)
Undocumented in source.
Response
struct Response(string name, ID = uint)

Templates

isSpawnable
template isSpawnable(F, T...)

Stolen from std.concurrency;

Variables

isActor
enum bool isActor(A);

Checks if a type has the required members to be an actor

isFailHandler
enum bool isFailHandler(F);
Undocumented in source.

Meta