Fan

 

final class

sys::Context

sys::Obj
  sys::Context

Context is used to encapsulate the mutable world state of an actor as it moves between threads during its execution lifetime. Context provides a map of arbitrary objects keyed by a string name to store state.

Slots

actorSource

Actor actor()

Get the actor associated with this context.

getSource

Obj? get(Str name, Obj? def := null)

Conveniece for getting a value from the map.

mapSource

Str:Obj? map()

Get the map used to store the actor's mutable state.

setSource

This set(Str name, Obj? val)

Conveniece for setting a value from the map.