The Singleton Ward
Centralized, globally unique actors.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Singleton
ARCANUM SCHOOL: Abjuration // Locus of Control
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// PONY PATTERN //
actor SingletonNexus
var _count: U32 = 0
be increment() => _count = _count + 1
The Singleton Ward
True singletons in the traditional sense are hazardous. In Pony, a single actor instance acts as a synchronized nexus, processing messages sequentially and avoiding state corruption.
Runic Tags:
#pony
#singleton
#actor