Stops arenas that have had no human in them for a while; they start again on the
next use of their world's name. Each sweep also seats the children a running arena
is short of (Cauldron2D.Arenas.reseat/1).
Cauldron2D.Arenas.Sweeper.start_link(idle_after: 120, every: 30)Options
:idle_after— seconds without a human before an arena is stopped. Default120:every— seconds between sweeps, or:neverto sweep only onsweep/1. Default30:name— the process name. Default the module,nilfor none
Summary
Functions
Returns a specification to start this module under a supervisor.
Start the sweeper.
Sweep now: seat missing children, note which running arenas are without humans and stop those idle long enough.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec start_link(keyword()) :: GenServer.on_start()
Start the sweeper.
@spec sweep(GenServer.server()) :: :ok
Sweep now: seat missing children, note which running arenas are without humans and stop those idle long enough.