You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Is VSTHRD011 (Use AsyncLazy<T>) missing from AppWithoutMainThread.editorconfig ? #1256
I probably spoke imprecisely on the comment you found. AsyncLazy<T> is still better than Lazy<Task<T>> in any application type, because the former will only block at most one thread while the value factory is running, whereas the latter will block all calling threads while the value factory is running up to the point it first yields.
Activity
AArnott commentedon Nov 6, 2023
I probably spoke imprecisely on the comment you found.
AsyncLazy<T>is still better thanLazy<Task<T>>in any application type, because the former will only block at most one thread while the value factory is running, whereas the latter will block all calling threads while the value factory is running up to the point it first yields.