Passed to AdapterFactory builders via BuilderContext.lifecycle.
Builders that create disposable sub-resources (Redis clients, interval
timers, etc.) SHOULD register a cleanup callback here.
Cleanups are invoked in LIFO order (reverse of registration) during
AppHandle.dispose(), with await between each (sequential, not parallel).
Errors in individual cleanups are logged and do NOT abort the drain. All
cleanup errors accumulate into the AggregateError that AppHandle.dispose()
may throw.
Passed to AdapterFactory builders via BuilderContext.lifecycle. Builders that create disposable sub-resources (Redis clients, interval timers, etc.) SHOULD register a cleanup callback here.
Cleanups are invoked in LIFO order (reverse of registration) during
AppHandle.dispose(), withawaitbetween each (sequential, not parallel). Errors in individual cleanups are logged and do NOT abort the drain. All cleanup errors accumulate into the AggregateError thatAppHandle.dispose()may throw.