feat(lifecycle): add HookEvent and LifecycleHooks registry #340
No reviewers
Labels
No labels
Blocked
Duplicate
MoSCoW/Could Have
MoSCoW/Must Have
MoSCoW/Should Have
Points/1
Points/13
Points/2
Points/21
Points/3
Points/5
Points/8
Priority/Backlog
Priority/Critical
Priority/High
Priority/Low
Priority/Medium
State/Completed
State/In progress
State/In review
State/Paused
State/Unverified
State/Verified
State/Wont Do
Type/Bug
Type/Epic
Type/Feature
Type/Legendary
Type/Task
Type/Testing
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: aethyr/Aethyr#340
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/m1-lifecycle-hooks"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Closes #83
Implements the foundational lifecycle hooks system for the Aethyr MUD framework:
HookEvent— Immutable data class carryingtype(Symbol),source(Object),data(Hash), andcancelled(Boolean) fields. Both the event object and its data hash are frozen on creation.LifecycleHooks— Singleton registry module providing thread-safeon/once/off/emitmethods with Mutex-protected callback storage. Callbacks fire in registration order; one-shot callbacks auto-remove after first invocation.Changes
lib/aethyr/core/components/lifecycle/hook_event.rblib/aethyr/core/components/lifecycle/lifecycle_hooks.rbtests/unit/lifecycle_hooks.featuretests/unit/step_definitions/lifecycle_hooks_steps.rb:symbolParameterTypeTesting
231ed62582tod4ad67752cd4ad67752ctof33982665ef33982665eto6270741a386270741a38to9a52108ea19a52108ea1tob570dbe54db570dbe54dto9b3d7e1cf1