Skip to content

Latest commit

 

History

History
5 lines (3 loc) · 599 Bytes

AsyncLazy.md

File metadata and controls

5 lines (3 loc) · 599 Bytes

Overview

The AsyncLazy<T> type enables asynchronous lazy initialization, similar to Stephen Toub's AsyncLazy.

An AsyncLazy<T> instance is constructed with a factory method. When the AsyncLazy<T> instance is awaited or its Start method is called, the factory method starts on a thread pool thread. The factory method is only executed once. Once the factory method has completed, all future awaits on that instance complete immediately.