pub fn register(trigger: Arc<dyn PhaseEndTrigger>) -> TriggerIdExpand description
Register a phase-end trigger. Returns a TriggerId the
caller can pass to unregister later. Idempotent within
a single registration — the same trigger object registered
twice fires twice.
The first registration also spawns the worker thread; it stays alive for the rest of the process so subsequent registrations are cheap.