Learn
Async resolution
Resolve asynchronous dependencies deterministically and share one in-flight Lazy Singleton initialization.
v0.1.0-dev.1Advancedark_di
Async resolution
get<T>() is deterministic: it never blocks or returns a Future. Requesting an async registration synchronously throws DiAsyncResolutionRequiredException. Use getAsync<T>() instead.
An Async Factory starts a new operation for each request. An Async Lazy Singleton shares one in-flight initialization among concurrent callers and stores only the successful result.
text
caller A ─┐
caller B ─┼─→ one initialization Future → one Singleton
caller C ─┘
If initialization fails, Ark DI clears the failed attempt. A later request may retry. Dependencies requested through the Factory resolver are recorded for cycle diagnostics and teardown planning.