lkn-core v0.4.1 Lkn.Core.Pool View Source
A specialized Supervisor which spawns new Map Instance when required.
Link to this section Summary
Functions
Register a given Puppeteer to an Instance of a given Map
Spwans a new Instances Pool for a given Lkn.Core.Map
Link to this section Functions
Link to this function
register_puppeteer(map_key, puppeteer_key, puppeteer_module)
View Source
register_puppeteer(Lkn.Core.Map.k, Lkn.Core.Puppeteer.k, Lkn.Core.Puppeteer.m) :: Lkn.Core.Instance.k
Register a given Puppeteer to an Instance of a given Map.
If required, the Pool will spawn a new Instance, so the Puppeteer do not have to worry about that. The Pool will return the Instance key.
Spwans a new Instances Pool for a given Lkn.Core.Map
.
The Map is expected to be alive before this function is called. After that, it
is possible for a Puppeteer to join an Instance of this Map using
register_puppeteer
.
Note: The Pool lives inside a dedicated Supervisor tree.