def cleanup
import bendvy-ecs-core@0.1.0.4/ordinary_lifetime_scope.bend as OrdinaryLifetimeScopeimport Base
import bendvy-ecs-core@0.1.0.4/lifetime_scope.bend as Sc
import bendvy-ecs-core@0.1.0.4/relation_commands.bend as A
import bendvy-ecs-core@0.1.0.4/capabilities.bend as Cap
78# Queue cleanup of the given scope, threading the opaque owner back.
79# Queued means accepted deferred work, not completed deletion; a foreign scope
80# returns MissingEntity without queuing cleanup. Membership is observed when the
81# command is applied at an explicit barrier, so same-world/name scopes refer to
82# the same group rather than distinct owners.
83# Cleanup uses the supplied linked-relation descriptors and component clear route.
84# An unscoped persistent entity survives only outside the linked deletion closure;
85# an unscoped linked descendant can still be deleted, while ordinary links from
86# survivors to removed targets are cleared. Queuing cleanup does not flush commands.
87# See docs/parity/scopes.md for the qualified survivor and relation boundary.
88def cleanup(~H:Type,~S:Data,~P:Type,~ops:Ops<H,S,P>,owner:H,scope:Sc.Scope<S>) -> H & A.QueueStatus:
89 Cap.request(~H,~Sc.Scope<S>,~A.QueueStatus,~cleanup_cap(~H,~S,~P,ops),owner,scope)
Uses (6)
Used by (0)
No other definition uses this definition.