A lightweight, async-safe, allocation-free one-time initialization gate. Ensures a given asynchronous initialization routine runs exactly once, even under concurrent callers, with support for cancellation, safe publication, and disposal.
AtomicResource is a thread-safe utility for holding a single instance of a resource that can be lazily created, atomically reset, and asynchronously torn down, ensuring safe concurrent access and predictable lifecycle management.